diff --git a/.eslintrc.js b/.eslintrc.js index d5f59e1a..b95b2b36 100644 --- a/.eslintrc.js +++ b/.eslintrc.js @@ -66,6 +66,7 @@ module.exports = { 'arrow-body-style': 'off', 'object-curly-newline': 'warn', 'semi': productionError, + 'padded-blocks': 'off', 'no-return-assign': 'off', 'no-restricted-imports': ['error', { name: 'electron-log', diff --git a/src/backend/import/bankScraper.ts b/src/backend/import/bankScraper.ts index 63a81df3..197799bc 100644 --- a/src/backend/import/bankScraper.ts +++ b/src/backend/import/bankScraper.ts @@ -24,9 +24,6 @@ type EmitProgressEventFunction = (eventCompanyId: string, message: string) => Pr export async function scrape({ companyId, credentials, startDate, showBrowser = false }: ScrapeParameters, emitProgressEvent: EmitProgressEventFunction, chromePath: string) { - if (!credentials || (!credentials.username && !credentials.num && !credentials.id) || !credentials.password) { - throw new Error(`Missing credentials for scraper. CompanyId: ${companyId}`); - } const options = { companyId, // mandatory; one of 'hapoalim', 'discount', 'otsarHahayal', 'leumiCard', 'isracard', 'amex' @@ -34,9 +31,7 @@ export async function scrape({ combineInstallments: false, // if set to true, all installment transactions will be combine into the first one showBrowser, // shows the browser while scraping, good for debugging (default false) verbose: false, // include more debug info about in the output - executablePath: chromePath, - prepareBrowser: async (_browser) => { }, - preparePage: async (_page) => { } + executablePath: chromePath }; const scraper = createScraper(options); scraper.onProgress((eventCompanyId: string, payload: { type: string }) => {