diff --git a/package.json b/package.json index 029b1b0..ed84779 100644 --- a/package.json +++ b/package.json @@ -1,7 +1,7 @@ { "name": "@applegamer22/scr-cli", "description": "Social media web scraper for post file downloads.", - "version": "1.0.0-alpha.29.8", + "version": "1.0.0-alpha.29.9", "author": "Omri Bornstein", "publisher": "AppleGamer22", "license": "GPL-3.0-only", diff --git a/src/shared.ts b/src/shared.ts index 135c216..910d8ea 100644 --- a/src/shared.ts +++ b/src/shared.ts @@ -23,8 +23,8 @@ export function chromeExecutable(): string { } } /** - * writes contents to the CLI's enviornment file - * @param content enviornment content + * writes contents to the CLI's environment file + * @param content environment content */ export function writeEnviornmentVariables(content: string) { writeFile(environmentVariablesFile, content, error => { @@ -73,7 +73,11 @@ export async function beginScrape(background: boolean, incognito: boolean = fals const page = (await browser.pages())[0]; await page.evaluateOnNewDocument(() => delete Object.getPrototypeOf(navigator).webdriver); await page.setBypassCSP(true); - // await page.setRequestInterception(true); + // @ts-ignore + await page._client.send("Network.enable", { + maxResourceBufferSize: 1024 * 1204 * 100, + maxTotalBufferSize: 1024 * 1204 * 200, + }); return { browser, page }; } catch (error) { alert(error.message, "danger");