unbrowse 6.2.1 → 6.2.2

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/dist/cli.js CHANGED
@@ -31,7 +31,7 @@ var __promiseAll = (args) => Promise.all(args);
31
31
  var __require = /* @__PURE__ */ createRequire(import.meta.url);
32
32
 
33
33
  // ../../src/build-info.generated.ts
34
- var BUILD_RELEASE_VERSION = "6.2.1", BUILD_GIT_SHA = "ed061ebe2aa3", BUILD_CODE_HASH = "5d9ebf619c61", BUILD_RELEASE_MANIFEST_BASE64 = "eyJzY2hlbWFfdmVyc2lvbiI6MSwicmVsZWFzZV92ZXJzaW9uIjoiNi4yLjEiLCJnaXRfc2hhIjoiZWQwNjFlYmUyYWEzIiwiY29kZV9oYXNoIjoiNWQ5ZWJmNjE5YzYxIiwidHJhY2VfdmVyc2lvbiI6IjVkOWViZjYxOWM2MUBlZDA2MWViZTJhYTMiLCJpc3N1ZWRfYXQiOiIyMDI2LTA1LTAxVDAyOjE2OjM2LjI2N1oifQ", BUILD_RELEASE_MANIFEST_SIGNATURE = "Fan4IoqjBRpYSnuyEEU29QiSm_MzGiY6YHy00jVqLU4", BUILD_DEFAULT_BACKEND_URL = "https://beta-api.unbrowse.ai";
34
+ var BUILD_RELEASE_VERSION = "6.2.2", BUILD_GIT_SHA = "ab0ce42ca851", BUILD_CODE_HASH = "5d9ebf619c61", BUILD_RELEASE_MANIFEST_BASE64 = "eyJzY2hlbWFfdmVyc2lvbiI6MSwicmVsZWFzZV92ZXJzaW9uIjoiNi4yLjIiLCJnaXRfc2hhIjoiYWIwY2U0MmNhODUxIiwiY29kZV9oYXNoIjoiNWQ5ZWJmNjE5YzYxIiwidHJhY2VfdmVyc2lvbiI6IjVkOWViZjYxOWM2MUBhYjBjZTQyY2E4NTEiLCJpc3N1ZWRfYXQiOiIyMDI2LTA1LTAxVDAyOjIzOjUxLjgzOFoifQ", BUILD_RELEASE_MANIFEST_SIGNATURE = "Lm5vsAU15QfuJjNo1B0T43zyE8FU4VdqDqQNZAhjRpg", BUILD_DEFAULT_BACKEND_URL = "https://beta-api.unbrowse.ai";
35
35
 
36
36
  // ../../src/version.ts
37
37
  import { createHash } from "crypto";
package/dist/mcp.js CHANGED
@@ -226,11 +226,11 @@ import { dirname, join, parse } from "path";
226
226
  import { fileURLToPath as fileURLToPath2 } from "url";
227
227
 
228
228
  // ../../src/build-info.generated.ts
229
- var BUILD_RELEASE_VERSION = "6.2.1";
230
- var BUILD_GIT_SHA = "ed061ebe2aa3";
229
+ var BUILD_RELEASE_VERSION = "6.2.2";
230
+ var BUILD_GIT_SHA = "ab0ce42ca851";
231
231
  var BUILD_CODE_HASH = "5d9ebf619c61";
232
- var BUILD_RELEASE_MANIFEST_BASE64 = "eyJzY2hlbWFfdmVyc2lvbiI6MSwicmVsZWFzZV92ZXJzaW9uIjoiNi4yLjEiLCJnaXRfc2hhIjoiZWQwNjFlYmUyYWEzIiwiY29kZV9oYXNoIjoiNWQ5ZWJmNjE5YzYxIiwidHJhY2VfdmVyc2lvbiI6IjVkOWViZjYxOWM2MUBlZDA2MWViZTJhYTMiLCJpc3N1ZWRfYXQiOiIyMDI2LTA1LTAxVDAyOjE2OjM2LjI2N1oifQ";
233
- var BUILD_RELEASE_MANIFEST_SIGNATURE = "Fan4IoqjBRpYSnuyEEU29QiSm_MzGiY6YHy00jVqLU4";
232
+ var BUILD_RELEASE_MANIFEST_BASE64 = "eyJzY2hlbWFfdmVyc2lvbiI6MSwicmVsZWFzZV92ZXJzaW9uIjoiNi4yLjIiLCJnaXRfc2hhIjoiYWIwY2U0MmNhODUxIiwiY29kZV9oYXNoIjoiNWQ5ZWJmNjE5YzYxIiwidHJhY2VfdmVyc2lvbiI6IjVkOWViZjYxOWM2MUBhYjBjZTQyY2E4NTEiLCJpc3N1ZWRfYXQiOiIyMDI2LTA1LTAxVDAyOjIzOjUxLjgzOFoifQ";
233
+ var BUILD_RELEASE_MANIFEST_SIGNATURE = "Lm5vsAU15QfuJjNo1B0T43zyE8FU4VdqDqQNZAhjRpg";
234
234
  var BUILD_DEFAULT_BACKEND_URL = "https://beta-api.unbrowse.ai";
235
235
 
236
236
  // ../../src/version.ts
package/dist/server.js CHANGED
@@ -7285,7 +7285,7 @@ var init_capture = __esm(async () => {
7285
7285
  });
7286
7286
 
7287
7287
  // ../../src/build-info.generated.ts
7288
- var BUILD_RELEASE_VERSION = "6.2.1", BUILD_GIT_SHA = "ed061ebe2aa3", BUILD_CODE_HASH = "5d9ebf619c61", BUILD_RELEASE_MANIFEST_BASE64 = "eyJzY2hlbWFfdmVyc2lvbiI6MSwicmVsZWFzZV92ZXJzaW9uIjoiNi4yLjEiLCJnaXRfc2hhIjoiZWQwNjFlYmUyYWEzIiwiY29kZV9oYXNoIjoiNWQ5ZWJmNjE5YzYxIiwidHJhY2VfdmVyc2lvbiI6IjVkOWViZjYxOWM2MUBlZDA2MWViZTJhYTMiLCJpc3N1ZWRfYXQiOiIyMDI2LTA1LTAxVDAyOjE2OjM2LjI2N1oifQ", BUILD_RELEASE_MANIFEST_SIGNATURE = "Fan4IoqjBRpYSnuyEEU29QiSm_MzGiY6YHy00jVqLU4", BUILD_DEFAULT_BACKEND_URL = "https://beta-api.unbrowse.ai";
7288
+ var BUILD_RELEASE_VERSION = "6.2.2", BUILD_GIT_SHA = "ab0ce42ca851", BUILD_CODE_HASH = "5d9ebf619c61", BUILD_RELEASE_MANIFEST_BASE64 = "eyJzY2hlbWFfdmVyc2lvbiI6MSwicmVsZWFzZV92ZXJzaW9uIjoiNi4yLjIiLCJnaXRfc2hhIjoiYWIwY2U0MmNhODUxIiwiY29kZV9oYXNoIjoiNWQ5ZWJmNjE5YzYxIiwidHJhY2VfdmVyc2lvbiI6IjVkOWViZjYxOWM2MUBhYjBjZTQyY2E4NTEiLCJpc3N1ZWRfYXQiOiIyMDI2LTA1LTAxVDAyOjIzOjUxLjgzOFoifQ", BUILD_RELEASE_MANIFEST_SIGNATURE = "Lm5vsAU15QfuJjNo1B0T43zyE8FU4VdqDqQNZAhjRpg", BUILD_DEFAULT_BACKEND_URL = "https://beta-api.unbrowse.ai";
7289
7289
 
7290
7290
  // ../../src/version.ts
7291
7291
  import { createHash as createHash2 } from "crypto";
@@ -13501,7 +13501,7 @@ function extractFromDOM(html, intent) {
13501
13501
  const trendStructures = extractTrendSpecial(workingHtml, intent);
13502
13502
  const definitionStructures = extractDefinitionSpecial(workingHtml, intent);
13503
13503
  const courseStructures = extractCourseSearchSpecial(workingHtml, intent);
13504
- const articleStructures = extractArticleBodySpecial(workingHtml, intent);
13504
+ const articleStructures = extractArticleBodySpecial(html.length > 600000 ? html.slice(0, 600000) : html, intent);
13505
13505
  const structures = [...flashStructures, ...githubStructures, ...linkedInStructures, ...packageSearchStructures, ...xProfileStructures, ...postStructures, ...trendStructures, ...definitionStructures, ...courseStructures, ...articleStructures, ...spaStructures, ...parseStructured(cleaned)].map((structure) => normalizeStructureForIntent(structure, intent));
13506
13506
  if (structures.length === 0) {
13507
13507
  return { data: null, extraction_method: "none", confidence: 0 };
@@ -13523,9 +13523,12 @@ function extractFromDOM(html, intent) {
13523
13523
  }
13524
13524
  const isArticleIntent = /(wikipedia|article|wiki page|page on|read|content of|body of|summary of|about )/i.test(intent);
13525
13525
  if (isArticleIntent) {
13526
- const bestPassingArticle = passing.find((candidate) => candidate.structure.type === "article");
13527
- if (bestPassingArticle && bestPassingOverall && bestPassingArticle.score >= bestPassingOverall.score - 8) {
13528
- return bestPassingArticle;
13526
+ const bestArticle = scored.find((candidate) => candidate.structure.type === "article");
13527
+ if (bestArticle) {
13528
+ const articleData = bestArticle.structure.data;
13529
+ if (articleData?.sections && Array.isArray(articleData.sections) && articleData.sections.length > 0) {
13530
+ return bestArticle;
13531
+ }
13529
13532
  }
13530
13533
  }
13531
13534
  return bestPassingOverall;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "unbrowse",
3
- "version": "6.2.1",
3
+ "version": "6.2.2",
4
4
  "description": "Reverse-engineer any website into reusable API skills. Zero-dep single binary with embedded browser engine.",
5
5
  "type": "module",
6
6
  "bin": {