doc2vec 1.0.4 → 1.0.5
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/Dockerfile +1 -0
- package/dist/doc2vec.js +4 -3
- package/doc2vec.ts +5 -3
- package/package.json +1 -1
package/Dockerfile
CHANGED
package/dist/doc2vec.js
CHANGED
|
@@ -1245,10 +1245,11 @@ class Doc2Vec {
|
|
|
1245
1245
|
async processPage(url, sourceConfig) {
|
|
1246
1246
|
const logger = this.logger.child('page-processor');
|
|
1247
1247
|
logger.debug(`Processing page content from ${url}`);
|
|
1248
|
-
|
|
1249
|
-
args: ['--no-sandbox', '--disable-setuid-sandbox'],
|
|
1250
|
-
});
|
|
1248
|
+
let browser = null;
|
|
1251
1249
|
try {
|
|
1250
|
+
browser = await puppeteer_1.default.launch({
|
|
1251
|
+
args: ['--no-sandbox', '--disable-setuid-sandbox'],
|
|
1252
|
+
});
|
|
1252
1253
|
const page = await browser.newPage();
|
|
1253
1254
|
logger.debug(`Navigating to ${url}`);
|
|
1254
1255
|
await page.goto(url, { waitUntil: 'networkidle2', timeout: 60000 });
|
package/doc2vec.ts
CHANGED
|
@@ -1467,10 +1467,12 @@ class Doc2Vec {
|
|
|
1467
1467
|
const logger = this.logger.child('page-processor');
|
|
1468
1468
|
logger.debug(`Processing page content from ${url}`);
|
|
1469
1469
|
|
|
1470
|
-
|
|
1471
|
-
args: ['--no-sandbox', '--disable-setuid-sandbox'],
|
|
1472
|
-
});
|
|
1470
|
+
let browser: Browser | null = null;
|
|
1473
1471
|
try {
|
|
1472
|
+
browser = await puppeteer.launch({
|
|
1473
|
+
args: ['--no-sandbox', '--disable-setuid-sandbox'],
|
|
1474
|
+
});
|
|
1475
|
+
|
|
1474
1476
|
const page: Page = await browser.newPage();
|
|
1475
1477
|
logger.debug(`Navigating to ${url}`);
|
|
1476
1478
|
await page.goto(url, { waitUntil: 'networkidle2', timeout: 60000 });
|