mbgex2 is a tool that mass-exports ERC Megabank Utilities bills.
This is v2, it should work with the latest erc.megabank.ua portal redesign.
The tool:
- shows accounts' data for the last month
- exports accounts' data into JSON and CSV formats for arbitrary period.
- .NET 5 SDK
- Windows / Linux
- Optionally: GNU make, bash
powershell ./build.ps1
$ make
-m
,--mode
: tool's mode. Empty for console output,export
for export-u
,--username
: account username, required-p
,--password
: account password, required-f
,--from
: start date, inyyyy-MM-dd
format, optional-t
,--to
: end date, inyyyy-MM-dd
format, optional
Show last month:
mbgex2.exe -u <username> -p <password>
Export since start-date
to last month inclusive:
mbgex2.exe --mode export -u <username> -p <password> --from <start-date>
Export since start-date
to end-date
inclusive:
mbgex2.exe --mode export -u <username> -p <password> --from <start-date> --to <end-date>
Export last month:
mbgex2.exe --mode export -u <username> -p <password>
In order to display latest month's info for all accounts:
Build
$ docker build . -t mbgex2
Run
$ docker run --rm -it mbgex2
which prompts to enter MegaBank username/password.
- failed login attempts are not clearly handled by APIs, so that output data is empty.
- export is performed into current folder
- the tool check first three accounts (usually users have a single one) - it's not clear how to get the accounts list
start-date
andend-date
dates are inclusive
- Raw data. JSON files of what APIs give back.
- CSVs. Data grouped by account ID and utility type.