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:
@@ -1379,7 +1379,11 @@ const SEARCH_EXTRACT = `(() => {
|
||||
const link = node.matches('a') ? node : node.closest('a');
|
||||
if (!link) continue;
|
||||
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;
|
||||
const title = clean(link.innerText);
|
||||
if (!title || title.length < 4) continue;
|
||||
|
||||
+1
-1
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@local/edge-kit-easy",
|
||||
"version": "3.6.6",
|
||||
"version": "3.6.7",
|
||||
"private": true,
|
||||
"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",
|
||||
|
||||
Reference in New Issue
Block a user