@sovovs/bycli 2.1.41 → 2.1.43
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/clis/weixin/_wechat/article-index.js +1 -1
- package/clis/weixin/_wechat/article-link.js +1 -1
- package/clis/weixin/_wechat/auth-session.js +1 -1
- package/clis/weixin/_wechat/sogou-search.js +1 -1
- package/clis/weixin/download.js +1 -1
- package/clis/weixin/save-articles.js +1 -1
- package/dist/src/execution.js +5 -1
- package/package.json +1 -1
|
@@ -129,7 +129,7 @@ function transportError(error, credentials) {
|
|
|
129
129
|
if (isWechatVerificationResponse(redactedMessage, redactedHint)) {
|
|
130
130
|
return new AuthRequiredError(
|
|
131
131
|
DOMAIN,
|
|
132
|
-
'WeChat article index requires environment verification. Complete it in the
|
|
132
|
+
'WeChat article index requires environment verification. Complete it in the retained browser tab and explicitly confirm completion to the caller.',
|
|
133
133
|
);
|
|
134
134
|
}
|
|
135
135
|
return new CommandExecutionError(
|
|
@@ -71,7 +71,7 @@ export async function resolveWechatArticleUrl(page, rawUrl) {
|
|
|
71
71
|
if (/验证码|安全验证|异常访问|访问过于频繁|请输入验证码/.test(text)) {
|
|
72
72
|
throw new AuthRequiredError(
|
|
73
73
|
'weixin.sogou.com',
|
|
74
|
-
'Sogou Weixin requires verification. Complete it in the
|
|
74
|
+
'Sogou Weixin requires verification. Complete it in the retained browser tab and explicitly confirm completion to the caller.',
|
|
75
75
|
);
|
|
76
76
|
}
|
|
77
77
|
if (!isTrustedWechatArticleUrl(result?.finalUrl)) {
|
|
@@ -131,7 +131,7 @@ export async function resolveBrowserCredentials(page, options = {}) {
|
|
|
131
131
|
|
|
132
132
|
throw new AuthRequiredError(
|
|
133
133
|
DOMAIN,
|
|
134
|
-
'WeChat login is required.
|
|
134
|
+
'WeChat login is required. Complete QR-code login in the retained browser tab and explicitly confirm completion to the caller.',
|
|
135
135
|
);
|
|
136
136
|
}
|
|
137
137
|
}
|
|
@@ -144,7 +144,7 @@ export async function searchSogouArticlePage(page, { query, pageNo, preloadedUrl
|
|
|
144
144
|
if (payload.blocked) {
|
|
145
145
|
throw new AuthRequiredError(
|
|
146
146
|
SOGOU_WEIXIN_DOMAIN,
|
|
147
|
-
'Sogou Weixin requires verification. Complete it in the
|
|
147
|
+
'Sogou Weixin requires verification. Complete it in the retained browser tab and explicitly confirm completion to the caller.',
|
|
148
148
|
);
|
|
149
149
|
}
|
|
150
150
|
if (payload.invalidCount > 0) {
|
package/clis/weixin/download.js
CHANGED
|
@@ -233,7 +233,7 @@ cli({
|
|
|
233
233
|
if (data?.errorHint === 'environment verification required') {
|
|
234
234
|
throw new AuthRequiredError(
|
|
235
235
|
'mp.weixin.qq.com',
|
|
236
|
-
'WeChat article page requires environment verification. Complete it in the
|
|
236
|
+
'WeChat article page requires environment verification. Complete it in the retained browser tab and explicitly confirm completion to the caller.',
|
|
237
237
|
);
|
|
238
238
|
}
|
|
239
239
|
const rows = await downloadArticle({
|
|
@@ -120,7 +120,7 @@ export async function fetchArticleHtmlInBrowser(article, page) {
|
|
|
120
120
|
if (result?.accessIssue) {
|
|
121
121
|
throw new AuthRequiredError(
|
|
122
122
|
DOMAIN,
|
|
123
|
-
'WeChat article page requires environment verification. Complete it in the
|
|
123
|
+
'WeChat article page requires environment verification. Complete it in the retained browser tab and explicitly confirm completion to the caller.',
|
|
124
124
|
);
|
|
125
125
|
}
|
|
126
126
|
if (!isTrustedWechatArticleUrl(result?.finalUrl)) {
|
package/dist/src/execution.js
CHANGED
|
@@ -446,7 +446,7 @@ export async function executeCommand(cmd, rawKwargs, debug = false, opts = {}) {
|
|
|
446
446
|
: new ObservationSession({
|
|
447
447
|
scope: {
|
|
448
448
|
contextId,
|
|
449
|
-
session,
|
|
449
|
+
session: adapterSession ? adapterSessionDiagnosticKey(cmd.site, adapterSession) : session,
|
|
450
450
|
target: page.getActivePage?.(),
|
|
451
451
|
site: cmd.site,
|
|
452
452
|
command: fullName(cmd),
|
|
@@ -742,6 +742,10 @@ function resolveAdapterBrowserSession(cmd, siteSession, adapterSession) {
|
|
|
742
742
|
}
|
|
743
743
|
return `site:${cmd.site}:${crypto.randomUUID()}`;
|
|
744
744
|
}
|
|
745
|
+
function adapterSessionDiagnosticKey(site, adapterSession) {
|
|
746
|
+
const digest = crypto.createHash('sha256').update(adapterSession).digest('hex').slice(0, 12);
|
|
747
|
+
return `site:${site}:adapter-${digest}`;
|
|
748
|
+
}
|
|
745
749
|
function normalizeBooleanOption(name, raw) {
|
|
746
750
|
if (raw === undefined || raw === '')
|
|
747
751
|
return null;
|