@gobing-ai/knowledge-kit 0.1.15 → 0.1.17
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.claude-plugin/marketplace.json +1 -1
- package/dist/index.js +1765 -40
- package/package.json +1 -1
- package/plugins/generations/content-gen/dist/index.js +58 -52
- package/plugins/generations/content-gen/src/storm.ts +94 -61
- package/plugins/generations/core-facts-gen/dist/index.js +1 -1
- package/plugins/generations/daily-article-gen/dist/index.js +1 -1
- package/plugins/generations/dailynews-gen/dist/index.js +1 -1
- package/plugins/generations/episode-plan-gen/dist/index.js +1 -1
- package/plugins/generations/gemini-tts/dist/index.js +1 -1
- package/plugins/generations/image-gen/README.md +31 -10
- package/plugins/generations/image-gen/assets/sample/cover__quasi-news-podcast.jpg +0 -0
- package/plugins/generations/image-gen/assets/sample/daily-news-cover__quasi-news-podcast.jpg +0 -0
- package/plugins/generations/image-gen/assets/sample/daily-news-podcast-cover__clean-webapp-ui.jpg +0 -0
- package/plugins/generations/image-gen/assets/sample/daily-news-podcast-cover__cute.jpg +0 -0
- package/plugins/generations/image-gen/assets/sample/daily-news-podcast-cover__daily-news.jpg +0 -0
- package/plugins/generations/image-gen/assets/sample/daily-news-podcast-cover__editorial.jpg +0 -0
- package/plugins/generations/image-gen/assets/sample/daily-news-podcast-cover__fresh.jpg +0 -0
- package/plugins/generations/image-gen/assets/sample/daily-news-podcast-cover__minimalist.jpg +0 -0
- package/plugins/generations/image-gen/assets/sample/daily-news-podcast-cover__photorealistic.jpg +0 -0
- package/plugins/generations/image-gen/assets/sample/daily-news-podcast-cover__quasi-news-podcast.jpg +0 -0
- package/plugins/generations/image-gen/assets/sample/daily-news-podcast-cover__sketch.jpg +0 -0
- package/plugins/generations/image-gen/assets/sample/daily-news-podcast-cover__technical-diagram.jpg +0 -0
- package/plugins/generations/image-gen/assets/sample/daily-news-podcast-cover__vibrant.jpg +0 -0
- package/plugins/generations/image-gen/assets/sample/daily-news-podcast-cover__warm.jpg +0 -0
- package/plugins/generations/image-gen/assets/sample/daily-news-podcast-cover__xhs-knowledge.jpg +0 -0
- package/plugins/generations/image-gen/assets/sample/free__quasi-news-podcast.jpg +0 -0
- package/plugins/generations/image-gen/assets/sample/illustration__quasi-news-podcast.jpg +0 -0
- package/plugins/generations/image-gen/assets/sample/xhs-card__quasi-news-podcast.jpg +0 -0
- package/plugins/generations/image-gen/dist/index.js +1 -1
- package/plugins/generations/image-gen/presets/formats/daily-news-podcast-cover.yaml +18 -0
- package/plugins/generations/image-gen/presets/styles/quasi-news-podcast.yaml +9 -0
- package/plugins/generations/news-report-gen/dist/index.js +1 -1
- package/plugins/generations/voice-gen/dist/index.js +1 -1
- package/plugins/generations/voxcpm-tts/dist/index.js +1 -1
- package/plugins/ingestions/aihot-ingest/dist/index.js +1 -1
- package/plugins/ingestions/horizon-ingest/dist/index.js +1 -1
- package/plugins/ingestions/last30days-ingest/dist/index.js +1 -1
- package/plugins/ingestions/web-search/dist/index.js +1 -1
- package/plugins/kk/plugin.json +1 -1
- package/plugins/kk/publish-presets/daily-ai-voice-migration.json +12 -3
- package/plugins/kk/publish-presets/daily-ai-voice.json +17 -9
- package/plugins/kk/publish-presets/itc-main.json +42 -0
- package/plugins/kk/scripts/cover-compositor.ts +198 -0
- package/plugins/kk/scripts/daily-cover-mock.ts +164 -0
- package/plugins/kk/scripts/daily-scheduled-run.ts +188 -3
- package/plugins/kk/scripts/daily-stages.ts +134 -26
- package/plugins/kk/scripts/daily-triage-core.ts +451 -0
- package/plugins/kk/scripts/daily-triage.ts +74 -0
- package/plugins/kk/scripts/itc-stages.ts +3 -2
- package/plugins/kk/scripts/kk-workflow-stages.ts +31 -2
- package/plugins/kk/scripts/voice3-publish-window.ts +5 -1
- package/plugins/kk/skills/content-safety/references/platforms/wechatmp.md +16 -10
- package/plugins/kk/skills/news-editorial/SKILL.md +3 -3
- package/plugins/kk/skills/news-editorial/references/style-contract.zh.md +2 -1
- package/plugins/kk/skills/publish/SKILL.md +1 -1
- package/plugins/kk/skills/wiki-authoring/SKILL.md +53 -0
- package/plugins/kk/skills/wiki-authoring/references/page-shapes.md +44 -0
- package/plugins/kk/workflows/kk-daily-ai-voice3.yaml +3 -3
- package/plugins/kk/workflows/kk-daily-publish3.yaml +10 -3
- package/plugins/kk/workflows/kk-daily-safety.yaml +32 -7
- package/plugins/publishings/bilibili-pub/dist/index.js +90 -17
- package/plugins/publishings/bilibili-pub/dist/profile-check.js +90 -16
- package/plugins/publishings/cnblogs-pub/dist/index.js +90 -17
- package/plugins/publishings/cnblogs-pub/dist/profile-check.js +90 -16
- package/plugins/publishings/csdn-pub/dist/index.js +90 -17
- package/plugins/publishings/csdn-pub/dist/profile-check.js +91 -17
- package/plugins/publishings/emdash-pub/dist/index.js +1 -1
- package/plugins/publishings/infoq-pub/dist/index.js +120 -19
- package/plugins/publishings/infoq-pub/dist/profile-check.js +95 -18
- package/plugins/publishings/infoq-pub/src/index.ts +40 -1
- package/plugins/publishings/jike-pub/dist/index.js +90 -17
- package/plugins/publishings/jike-pub/dist/profile-check.js +91 -17
- package/plugins/publishings/juejin-pub/dist/index.js +117 -20
- package/plugins/publishings/juejin-pub/dist/profile-check.js +94 -18
- package/plugins/publishings/juejin-pub/src/index.ts +41 -2
- package/plugins/publishings/linkedin-pub/dist/index.js +90 -17
- package/plugins/publishings/linkedin-pub/dist/profile-check.js +91 -17
- package/plugins/publishings/medium-pub/dist/index.js +1 -1
- package/plugins/publishings/podcast-pub/dist/index.js +1 -1
- package/plugins/publishings/qiita-pub/dist/index.js +1 -1
- package/plugins/publishings/shipinhao-pub/dist/index.js +311 -66
- package/plugins/publishings/shipinhao-pub/dist/profile-check.js +138 -17
- package/plugins/publishings/shipinhao-pub/plugin.json +2 -2
- package/plugins/publishings/shipinhao-pub/src/flow.ts +335 -79
- package/plugins/publishings/shipinhao-pub/src/index.ts +16 -8
- package/plugins/publishings/shipinhao-pub/src/profile-check.ts +1 -1
- package/plugins/publishings/shipinhao-pub/src/selectors.ts +103 -5
- package/plugins/publishings/sspai-pub/dist/index.js +90 -17
- package/plugins/publishings/sspai-pub/dist/profile-check.js +90 -16
- package/plugins/publishings/substack-pub/dist/index.js +90 -17
- package/plugins/publishings/substack-pub/dist/profile-check.js +91 -17
- package/plugins/publishings/surfdash-pub/dist/index.js +244 -13
- package/plugins/publishings/surfdash-pub/src/index.ts +144 -8
- package/plugins/publishings/surfdash-pub/src/topic-claims.ts +189 -0
- package/plugins/publishings/threads-pub/dist/index.js +1 -1
- package/plugins/publishings/wechatmp-pub/dist/index.js +186 -39
- package/plugins/publishings/wechatmp-pub/dist/profile-check.js +96 -19
- package/plugins/publishings/wechatmp-pub/src/cgi-draft.ts +14 -2
- package/plugins/publishings/wechatmp-pub/src/enrich.ts +10 -3
- package/plugins/publishings/wechatmp-pub/src/flow.ts +158 -25
- package/plugins/publishings/wechatmp-pub/src/page.ts +14 -0
- package/plugins/publishings/wechatmp-pub/src/profile-check.ts +8 -1
- package/plugins/publishings/weibo-pub/dist/index.js +90 -17
- package/plugins/publishings/weibo-pub/dist/profile-check.js +91 -17
- package/plugins/publishings/x-pub/dist/index.js +90 -17
- package/plugins/publishings/x-pub/dist/profile-check.js +91 -17
- package/plugins/publishings/xhs-pub/dist/index.js +646 -47
- package/plugins/publishings/xhs-pub/dist/profile-check.js +109 -17
- package/plugins/publishings/xhs-pub/src/errors.ts +45 -0
- package/plugins/publishings/xhs-pub/src/flow.ts +773 -45
- package/plugins/publishings/xhs-pub/src/page.ts +33 -0
- package/plugins/publishings/xiaoyuzhou-pub/dist/index.js +90 -17
- package/plugins/publishings/xiaoyuzhou-pub/dist/profile-check.js +90 -16
- package/plugins/publishings/zenn-pub/dist/index.js +94 -2
- package/plugins/publishings/zenn-pub/src/index.ts +134 -1
|
@@ -19853,8 +19853,11 @@ import {
|
|
|
19853
19853
|
mkdirSync as mkdirSync2,
|
|
19854
19854
|
openSync,
|
|
19855
19855
|
readdirSync as readdirSync2,
|
|
19856
|
+
readlinkSync,
|
|
19856
19857
|
realpathSync as realpathSync2,
|
|
19857
|
-
|
|
19858
|
+
renameSync as renameSync2,
|
|
19859
|
+
rmdirSync,
|
|
19860
|
+
unlinkSync
|
|
19858
19861
|
} from "fs";
|
|
19859
19862
|
function lstat(path) {
|
|
19860
19863
|
try {
|
|
@@ -19889,6 +19892,33 @@ function rmdir(path) {
|
|
|
19889
19892
|
throw error;
|
|
19890
19893
|
}
|
|
19891
19894
|
}
|
|
19895
|
+
function readlink(path) {
|
|
19896
|
+
try {
|
|
19897
|
+
return readlinkSync(path);
|
|
19898
|
+
} catch {
|
|
19899
|
+
return null;
|
|
19900
|
+
}
|
|
19901
|
+
}
|
|
19902
|
+
function unlink(path) {
|
|
19903
|
+
try {
|
|
19904
|
+
unlinkSync(path);
|
|
19905
|
+
return true;
|
|
19906
|
+
} catch (error) {
|
|
19907
|
+
if (error.code === "ENOENT")
|
|
19908
|
+
return false;
|
|
19909
|
+
throw error;
|
|
19910
|
+
}
|
|
19911
|
+
}
|
|
19912
|
+
function rename(from, to) {
|
|
19913
|
+
try {
|
|
19914
|
+
renameSync2(from, to);
|
|
19915
|
+
return true;
|
|
19916
|
+
} catch (error) {
|
|
19917
|
+
if (error.code === "ENOENT")
|
|
19918
|
+
return false;
|
|
19919
|
+
throw error;
|
|
19920
|
+
}
|
|
19921
|
+
}
|
|
19892
19922
|
function chmod(path, mode) {
|
|
19893
19923
|
chmodSync(path, mode);
|
|
19894
19924
|
}
|
|
@@ -19900,14 +19930,14 @@ var DEFAULT_BOT_TRANSACTION_ROOT = join(homedir(), ".config", "kk", "browser-tra
|
|
|
19900
19930
|
|
|
19901
19931
|
// ../../packages/publish-harness/src/profile-lease.ts
|
|
19902
19932
|
import { createHash, randomBytes } from "crypto";
|
|
19903
|
-
import { homedir as homedir2 } from "os";
|
|
19933
|
+
import { homedir as homedir2, hostname } from "os";
|
|
19904
19934
|
import { basename, dirname as dirname3, join as join2, resolve as resolve2 } from "path";
|
|
19905
19935
|
var DEFAULT_BOT_LEASE_ROOT = join2(homedir2(), ".config", "kk", "browser-leases");
|
|
19906
19936
|
var KK_BOT_LEASE_PATH = "KK_BOT_LEASE_PATH";
|
|
19907
19937
|
var KK_BOT_LEASE_TOKEN = "KK_BOT_LEASE_TOKEN";
|
|
19908
19938
|
var OWNER_FILE = "owner.json";
|
|
19909
19939
|
var HOLDER_PREFIX = "holder-";
|
|
19910
|
-
var NATIVE_LOCK_FILES = ["SingletonLock", "SingletonSocket"];
|
|
19940
|
+
var NATIVE_LOCK_FILES = ["SingletonLock", "SingletonSocket", "SingletonCookie"];
|
|
19911
19941
|
async function acquireProfileLease(profileDir, options = {}) {
|
|
19912
19942
|
const fileSystem = options.fileSystem ?? createNodeFileSystem();
|
|
19913
19943
|
const leaseRoot = options.leaseRoot ?? DEFAULT_BOT_LEASE_ROOT;
|
|
@@ -20075,6 +20105,8 @@ function isProcessAlive(pid) {
|
|
|
20075
20105
|
}
|
|
20076
20106
|
}
|
|
20077
20107
|
function refuseNativeLock(profileDir) {
|
|
20108
|
+
if (reclaimStaleNativeLock(profileDir))
|
|
20109
|
+
return;
|
|
20078
20110
|
for (const name of NATIVE_LOCK_FILES) {
|
|
20079
20111
|
const path = join2(profileDir, name);
|
|
20080
20112
|
if (lstat(path) !== null) {
|
|
@@ -20082,6 +20114,24 @@ function refuseNativeLock(profileDir) {
|
|
|
20082
20114
|
}
|
|
20083
20115
|
}
|
|
20084
20116
|
}
|
|
20117
|
+
function reclaimStaleNativeLock(profileDir) {
|
|
20118
|
+
const lockPath = join2(profileDir, "SingletonLock");
|
|
20119
|
+
const target = readlink(lockPath);
|
|
20120
|
+
if (target === null)
|
|
20121
|
+
return false;
|
|
20122
|
+
const match = /^(.*)-(\d+)$/.exec(target);
|
|
20123
|
+
if (match === null)
|
|
20124
|
+
return false;
|
|
20125
|
+
const [, host, pidText] = match;
|
|
20126
|
+
if (host !== hostname())
|
|
20127
|
+
return false;
|
|
20128
|
+
const pid = Number(pidText);
|
|
20129
|
+
if (!Number.isInteger(pid) || pid <= 0 || isProcessAlive(pid))
|
|
20130
|
+
return false;
|
|
20131
|
+
for (const name of NATIVE_LOCK_FILES)
|
|
20132
|
+
unlink(join2(profileDir, name));
|
|
20133
|
+
return true;
|
|
20134
|
+
}
|
|
20085
20135
|
function sha256Hex(value) {
|
|
20086
20136
|
return createHash("sha256").update(value).digest("hex");
|
|
20087
20137
|
}
|
|
@@ -20140,6 +20190,27 @@ var DEFAULT_LOGIN_TIMEOUT_MS = 180000;
|
|
|
20140
20190
|
var DEFAULT_OPEN_NAV_TIMEOUT_MS = 30000;
|
|
20141
20191
|
var DEFAULT_CHECK_TIMEOUT_MS = 30000;
|
|
20142
20192
|
var DEFAULT_POLL_MS = 500;
|
|
20193
|
+
function isInstantBrowserDeath(message) {
|
|
20194
|
+
return /target page, context or browser has been closed|browser has been closed|target closed/i.test(message);
|
|
20195
|
+
}
|
|
20196
|
+
function classifyLaunchError(error, profileDir, channel) {
|
|
20197
|
+
const message = errorMessage2(error);
|
|
20198
|
+
if (/singleton|already in use|in use by another/i.test(message))
|
|
20199
|
+
return new BrowserProfileBusyError(profileDir, error);
|
|
20200
|
+
if (/playwright install|executable doesn't exist/i.test(message)) {
|
|
20201
|
+
return new PlaywrightUnavailableError(`Browser channel '${channel}' is not installed. Run \`bunx playwright install chromium\` (or install Google Chrome for KK_BROWSER_CHANNEL=chrome).`, { cause: error });
|
|
20202
|
+
}
|
|
20203
|
+
if (isInstantBrowserDeath(message)) {
|
|
20204
|
+
return new PlaywrightUnavailableError(`browser profile ${profileDir} makes Chromium exit during startup (no diagnostic reported). Move it aside (\`mv ${profileDir} ${profileDir}.broken-<date>\`) and log in again; \`storage-state.json\` is the only state worth keeping.`, { cause: error });
|
|
20205
|
+
}
|
|
20206
|
+
return error instanceof Error ? error : new Error(message);
|
|
20207
|
+
}
|
|
20208
|
+
function quarantineProfileSyncData(profileDir) {
|
|
20209
|
+
const syncData = join5(profileDir, "Default", "Sync Data");
|
|
20210
|
+
if (lstat(syncData) === null)
|
|
20211
|
+
return false;
|
|
20212
|
+
return rename(syncData, `${syncData}.broken-${new Date().toISOString().replace(/[:.]/g, "").slice(0, 15)}`);
|
|
20213
|
+
}
|
|
20143
20214
|
function createKkBrowserLauncher(loadPlaywright = () => import("playwright"), ownership, leaseOptions = {}) {
|
|
20144
20215
|
return {
|
|
20145
20216
|
async launch(request) {
|
|
@@ -20168,23 +20239,25 @@ async function launchKkContext(loadPlaywright, profileDir, headless) {
|
|
|
20168
20239
|
throw new PlaywrightUnavailableError('The "playwright" dependency is not installed. Run `bunx playwright install chromium`.', { cause: error });
|
|
20169
20240
|
}
|
|
20170
20241
|
const channel = process.env.KK_BROWSER_CHANNEL?.trim() || "chromium";
|
|
20242
|
+
const launch = () => playwright.chromium.launchPersistentContext(profileDir, {
|
|
20243
|
+
headless,
|
|
20244
|
+
channel,
|
|
20245
|
+
args: ["--disable-blink-features=AutomationControlled"],
|
|
20246
|
+
ignoreDefaultArgs: ["--enable-automation"]
|
|
20247
|
+
});
|
|
20171
20248
|
let context;
|
|
20172
20249
|
try {
|
|
20173
|
-
context = await
|
|
20174
|
-
headless,
|
|
20175
|
-
channel,
|
|
20176
|
-
args: ["--disable-blink-features=AutomationControlled"],
|
|
20177
|
-
ignoreDefaultArgs: ["--enable-automation"]
|
|
20178
|
-
});
|
|
20250
|
+
context = await launch();
|
|
20179
20251
|
} catch (error) {
|
|
20180
|
-
|
|
20181
|
-
|
|
20182
|
-
|
|
20183
|
-
|
|
20184
|
-
|
|
20185
|
-
|
|
20252
|
+
if (!isInstantBrowserDeath(errorMessage2(error)))
|
|
20253
|
+
throw classifyLaunchError(error, profileDir, channel);
|
|
20254
|
+
if (!quarantineProfileSyncData(profileDir))
|
|
20255
|
+
throw classifyLaunchError(error, profileDir, channel);
|
|
20256
|
+
try {
|
|
20257
|
+
context = await launch();
|
|
20258
|
+
} catch (retryError) {
|
|
20259
|
+
throw classifyLaunchError(retryError, profileDir, channel);
|
|
20186
20260
|
}
|
|
20187
|
-
throw error;
|
|
20188
20261
|
}
|
|
20189
20262
|
try {
|
|
20190
20263
|
await context.addInitScript(() => {
|
|
@@ -20341,6 +20414,7 @@ async function runProfileCli(config, argv = process.argv.slice(2), deps = {}) {
|
|
|
20341
20414
|
if (command === "login") {
|
|
20342
20415
|
const loginTimeoutMs = timeoutMs ?? config.loginTimeoutMs ?? DEFAULT_LOGIN_TIMEOUT_MS;
|
|
20343
20416
|
const launcher = deps.launcher ?? kkBrowserLauncher;
|
|
20417
|
+
stdout(`${config.channel} profile login: a browser window is opening \u2014 sign in there; waiting up to ${Math.round(loginTimeoutMs / 1000)}s for the signed-in state`);
|
|
20344
20418
|
try {
|
|
20345
20419
|
if (url === undefined) {
|
|
20346
20420
|
await loginWithProfile({
|
|
@@ -20426,7 +20500,8 @@ function errorMessage2(error) {
|
|
|
20426
20500
|
|
|
20427
20501
|
// ../../plugins/publishings/shipinhao-pub/src/selectors.ts
|
|
20428
20502
|
var SHP_TARGET = "shipinhao";
|
|
20429
|
-
var SHP_HOME_URL = "https://channels.weixin.qq.com/platform
|
|
20503
|
+
var SHP_HOME_URL = "https://channels.weixin.qq.com/platform";
|
|
20504
|
+
var SHP_CREATE_ENTRY_SELECTORS = ['button:text-is("\u53D1\u8868\u89C6\u9891")'];
|
|
20430
20505
|
var SHP_LOGIN_URL_RE = /(open\.weixin\.qq\.com|channels\.weixin\.qq\.com\/platform\/(login|scan))/;
|
|
20431
20506
|
var ROOT_SNAPSHOT_SCRIPT = `(() => { // kk-shp-root-snapshot
|
|
20432
20507
|
const wujieApp = document.querySelector('wujie-app');
|
|
@@ -20460,6 +20535,52 @@ async function readRootSnapshot(page) {
|
|
|
20460
20535
|
shadowTextEvidence: 0
|
|
20461
20536
|
};
|
|
20462
20537
|
}
|
|
20538
|
+
var SHP_VIDEO_SELECTORS = {
|
|
20539
|
+
createEntry: SHP_CREATE_ENTRY_SELECTORS,
|
|
20540
|
+
videoInput: [
|
|
20541
|
+
'input[type="file"][accept*="video"]',
|
|
20542
|
+
'input[type="file"][accept*=".mp4"]',
|
|
20543
|
+
'input[type="file"][accept*=".mov"]',
|
|
20544
|
+
'section:has(input[type="file"]):has-text("\u4E0A\u4F20\u89C6\u9891") input[type="file"]',
|
|
20545
|
+
'section:has(input[type="file"]):has-text("\u89C6\u9891\u6587\u4EF6") input[type="file"]',
|
|
20546
|
+
'input[type="file"]'
|
|
20547
|
+
],
|
|
20548
|
+
titleInput: ['input[placeholder*="\u77ED\u6807\u9898"]', 'input[placeholder*="\u586B\u5199\u6807\u9898"]', 'input[placeholder*="\u6807\u9898"]'],
|
|
20549
|
+
descriptionEditor: [
|
|
20550
|
+
'[data-placeholder^="\u6DFB\u52A0\u63CF\u8FF0"]',
|
|
20551
|
+
'[placeholder^="\u6DFB\u52A0\u63CF\u8FF0"]',
|
|
20552
|
+
'[role="textbox"][aria-label^="\u6DFB\u52A0\u63CF\u8FF0"]',
|
|
20553
|
+
'[placeholder*="\u8BDD\u9898\u548C\u63CF\u8FF0"]'
|
|
20554
|
+
],
|
|
20555
|
+
coverEditEntry: ["div.cover-preview-wrap > div"],
|
|
20556
|
+
coverDialog: [
|
|
20557
|
+
"div.cover-control-wrap",
|
|
20558
|
+
'div[class*="cover"][class*="dialog"]',
|
|
20559
|
+
'div[class*="cover"][class*="modal"]',
|
|
20560
|
+
'[role="dialog"]'
|
|
20561
|
+
],
|
|
20562
|
+
coverDialogFileInputSuffix: 'input[type="file"]',
|
|
20563
|
+
coverConfirmLabels: ["\u786E\u8BA4", "\u5B8C\u6210", "\u4FDD\u5B58", "\u5E94\u7528", "\u786E\u5B9A"],
|
|
20564
|
+
coverConfirmFooter: "div.finder-dialog-footer button",
|
|
20565
|
+
originalAgreementCheckbox: 'div.declare-body-wrapper input[type="checkbox"].ant-checkbox-input',
|
|
20566
|
+
originalConfirmLabel: "\u58F0\u660E\u539F\u521B",
|
|
20567
|
+
saveButton: ['button:text-is("\u4FDD\u5B58\u8349\u7A3F")'],
|
|
20568
|
+
publishButton: ['button:text-is("\u53D1\u8868")', '[role="button"]:text-is("\u53D1\u8868")']
|
|
20569
|
+
};
|
|
20570
|
+
var SHP_AUDIO_SELECTORS = {
|
|
20571
|
+
...SHP_VIDEO_SELECTORS,
|
|
20572
|
+
audioInput: ['input[type="file"][accept*="video"]', 'input[type="file"]']
|
|
20573
|
+
};
|
|
20574
|
+
var SHP_MUSIC_SELECTORS = { ...SHP_AUDIO_SELECTORS };
|
|
20575
|
+
var SHP_IMAGE_SELECTORS = {
|
|
20576
|
+
...SHP_VIDEO_SELECTORS,
|
|
20577
|
+
imagesInput: [
|
|
20578
|
+
'input[type="file"][multiple]',
|
|
20579
|
+
'input[type="file"][accept*="image"]',
|
|
20580
|
+
'section:has(input[type="file"]):has-text("\u4E0A\u4F20\u56FE\u7247") input[type="file"]',
|
|
20581
|
+
'input[type="file"]'
|
|
20582
|
+
]
|
|
20583
|
+
};
|
|
20463
20584
|
var SHP_LOGIN_TIMEOUT_MS = 180000;
|
|
20464
20585
|
var isShipinhaoAuthenticated = async (page) => {
|
|
20465
20586
|
if (SHP_LOGIN_URL_RE.test(page.url()))
|
|
@@ -4,9 +4,9 @@
|
|
|
4
4
|
"entry": "./dist/index.js",
|
|
5
5
|
"check": "./dist/profile-check.js",
|
|
6
6
|
"version": "1.0.0",
|
|
7
|
-
"description": "shipinhao (channels.weixin.qq.com)
|
|
7
|
+
"description": "shipinhao (channels.weixin.qq.com) publish via a script browser transport with wujie-app shadowRoot traversal; four post kinds (shortVideo 视频, audio 音频, image 图文, music 音乐 — audio is the first deliverable); draft by default, public only on an explicit publishStatus with a fresh works receipt, requested-only 声明原创 declaration",
|
|
8
8
|
"browserSession": {
|
|
9
9
|
"profileName": "shipinhao",
|
|
10
|
-
"homeUrl": "https://channels.weixin.qq.com/platform
|
|
10
|
+
"homeUrl": "https://channels.weixin.qq.com/platform"
|
|
11
11
|
}
|
|
12
12
|
}
|