@browserbasehq/sdk
Advanced tools
Comparing version 1.2.0 to 1.2.1
@@ -137,8 +137,6 @@ "use strict"; | ||
if (options.textContent) { | ||
const readable = await page.evaluate(async () => { | ||
const readability = await import( | ||
// @ts-ignore | ||
'https://cdn.skypack.dev/@mozilla/readability'); | ||
return new readability.Readability(document).parse(); | ||
}); | ||
const readable = await page.evaluate(` | ||
import('https://cdn.skypack.dev/@mozilla/readability').then(readability => { | ||
return new readability.Readability(document).parse() | ||
})`); | ||
html = `${readable.title}\n${readable.textContent}`; | ||
@@ -165,8 +163,6 @@ } | ||
if (options.textContent) { | ||
const readable = await page.evaluate(async () => { | ||
const readability = await import( | ||
// @ts-ignore | ||
'https://cdn.skypack.dev/@mozilla/readability'); | ||
return new readability.Readability(document).parse(); | ||
}); | ||
const readable = await page.evaluate(` | ||
import('https://cdn.skypack.dev/@mozilla/readability').then(readability => { | ||
return new readability.Readability(document).parse() | ||
})`); | ||
html = `${readable.title}\n${readable.textContent}`; | ||
@@ -173,0 +169,0 @@ } |
{ | ||
"name": "@browserbasehq/sdk", | ||
"version": "1.2.0", | ||
"version": "1.2.1", | ||
"description": "Browserbase JS SDK", | ||
@@ -5,0 +5,0 @@ "main": "dist/index.js", |
@@ -278,9 +278,7 @@ import puppeteer from 'puppeteer-core' | ||
if (options.textContent) { | ||
const readable = await page.evaluate(async () => { | ||
const readability = await import( | ||
// @ts-ignore | ||
'https://cdn.skypack.dev/@mozilla/readability' | ||
) | ||
return new readability.Readability(document).parse() | ||
}) | ||
const readable: { title?: string; textContent?: string } = | ||
await page.evaluate(` | ||
import('https://cdn.skypack.dev/@mozilla/readability').then(readability => { | ||
return new readability.Readability(document).parse() | ||
})`) | ||
html = `${readable.title}\n${readable.textContent}` | ||
@@ -316,9 +314,7 @@ } | ||
if (options.textContent) { | ||
const readable = await page.evaluate(async () => { | ||
const readability = await import( | ||
// @ts-ignore | ||
'https://cdn.skypack.dev/@mozilla/readability' | ||
) | ||
return new readability.Readability(document).parse() | ||
}) | ||
const readable: { title?: string; textContent?: string } = | ||
await page.evaluate(` | ||
import('https://cdn.skypack.dev/@mozilla/readability').then(readability => { | ||
return new readability.Readability(document).parse() | ||
})`) | ||
html = `${readable.title}\n${readable.textContent}` | ||
@@ -325,0 +321,0 @@ } |
67268
724