What you can find here is scrapers for all major Israeli banks and credit card companies. That's the plan at least. Currently only Discount Bank, Leumi Card and Isracard are supported.
To use this you will need to have Node.js >= 6 installed.
To use these scrapers you'll need to install the package from npm:
npm install israeli-bank-scrapers --save
Then you can simply import and use it in your node module:
import { createScraper } from 'israeli-bank-scrapers';
const credentials = {...}; // different for each bank
const options = {...};
const scraper = createScraper(options);
const scrapeResult = scraper.scrape(credentials);
if (scrapeResult.success) {
console.log(`account number: ${scrapeResult.accountNumber}`);
console.log(`# transactions found: ${scrapeResult.txns.length}`);
}
else {
console.error(`scraping failed for the following reason: ${scrapeResult.errorType}`);
}
The definition of the options
object is as follows:
{
companyId: string, // mandatory; one of 'discount', 'leumiCard', 'isracard'
startDate: Date, // the date to fetch transactions from (can't be before the minimum allowed time difference for the scraper)
verbose: boolean // include more debug info about in the output
}
The structure of the result object is as follows:
{
success: boolean,
accountNumber: string,
txns: [{
type: string, // can be either 'normal' or 'installments'
identifier: int, // only if exists
date: Date,
processedDate: Date,
amount: double,
description: string,
installments: {
number: int, // the current installment number
total: int, // the total number of installments
}
}],
errorType: "invalidPassword"|"changePassword"|"timeout"|"generic", // only on success=false
errorMessage: string, // only on success=false
}
You can also use the SCRAPERS
list to get scraper metadata:
import { SCRAPERS } from 'israeli-bank-scrapers';
The return value is a list of scraper metadata:
{
<companyId>: {
name: string, // the name of the scraper
loginFields: [ // a list of login field required by this scraper
'<some field>' // the name of the field
]
}
}
This scraper expects the following credentials object:
const credentials = {
id: <user identification number>,
password: <user password>,
num: <user identificaiton code>
};
This scraper supports fetching transaction from up to one year (minus 1 day).
This scraper expects the following credentials object:
const credentials = {
username: <user name>,
password: <user password>
};
This scraper supports fetching transaction from up to one year.
This scraper expects the following credentials object:
const credentials = {
id: <user identification number>,
card6Digits: <6 last digits of card>
password: <user password>
};
This scraper supports fetching transaction from up to one year.
The MIT License