v3.6.7: unwrap Bing ck/a and Google url= link wrappers before the own-domain filter, so native web_search returns organic sources

This commit is contained in:
2026-11-08 23:39:00 +03:30
parent 0cb2daa402
commit 7fdd0fc543
2 changed files with 6 additions and 2 deletions
+5 -1
View File
@@ -1379,7 +1379,11 @@ const SEARCH_EXTRACT = `(() => {
const link = node.matches('a') ? node : node.closest('a'); const link = node.matches('a') ? node : node.closest('a');
if (!link) continue; if (!link) continue;
let url = link.href; let url = link.href;
if (/^\\/(url|link)\\?/.test(url)) { const m = url.match(/[?&](?:url|q)=([^&]+)/); if (m) { try { url = decodeURIComponent(m[1]); } catch {} } } // Engines wrap organic URLs: Google /url?url=..., Bing /ck/a?u=a1<base64>.
// Unwrap first — then apply the own-domain filter, or the wrappers eat
// every real result.
{ const m = url.match(/[?&]u=([^&]+)/); if (m) { let v = m[1]; if (v.startsWith('a1')) v = v.slice(2); try { const d = atob(v.replace(/-/g, '+').replace(/_/g, '/')); if (/^https?:/i.test(d)) url = d; } catch {} } }
{ const m = url.match(/[?&](?:url|q)=([^&]+)/); if (m) { try { const d = decodeURIComponent(m[1]); if (/^https?:/i.test(d)) url = d; } catch {} } }
if (!/^https?:/i.test(url) || seen.has(url) || selfUrl(url)) continue; if (!/^https?:/i.test(url) || seen.has(url) || selfUrl(url)) continue;
const title = clean(link.innerText); const title = clean(link.innerText);
if (!title || title.length < 4) continue; if (!title || title.length < 4) continue;
+1 -1
View File
@@ -1,6 +1,6 @@
{ {
"name": "@local/edge-kit-easy", "name": "@local/edge-kit-easy",
"version": "3.6.6", "version": "3.6.7",
"private": true, "private": true,
"type": "module", "type": "module",
"description": "Edge Kit Browser — human-style browsing for agents in Edge, Chrome, or Firefox: see, click, type, video understanding, gameplay; live-attach-first over CDP/BiDi with a native settings page and the native web seam", "description": "Edge Kit Browser — human-style browsing for agents in Edge, Chrome, or Firefox: see, click, type, video understanding, gameplay; live-attach-first over CDP/BiDi with a native settings page and the native web seam",