Scrape data from an internet banking site using MyBCA (Web)
Create a class <ibanking_name>BankScraper (e.g. MyBcaBankScraper) that inherits from BaseBankScraper to scrap user’s transaction from the internet banking site. Please use TypeScript and Puppeteer.
interface BankTransaction {
bankCode: string;
accountNum: string;
transactionDate: DateTime;
transactionType: "CR" | "DB"; // credit or debit
transactionAmount: number;
transactionName: string;
// Unique identifier for each trx. Generated from the md5 hash of a
// string concatenation of:
// - bankCode
// - accountNum
// - transactionDate
// - transactionType
// - transactionAmount
// - transactionName
externalId: string;
}
abstract class BaseBankScraper {
abstract login()
abstract getCurrentBalance(): number
abstract getTransactions(startAt: Date, endAt: Date): []BankTransaction
abstract logout()
}
- Node JS [v14.18.0]
- Yarn [1.22.19]
- Clone this repository
- Copy
.env.example
to.env
file - Fill
.env
file credential - Install node packages
yarn install
yarn bstart # if you use unix system
yarn bstart-windows # if you use windows system
- Malik Akbar Hashemi Rafsanjani
- 13520105@std.stei.itb.ac.id