Skip to content

Externally

Summary

  1. Create an import token
  2. Set up a JSON file with your credentials
  3. Run the import. Either:
    1. Fork money-tiger-scraper on GitHub
    2. Run money-tiger-scraper-docker

1. Create an import token

  1. Navigate to 🐯 Import Keys
  2. Create a new key and copy the key

2. Set up a JSON file with your credentials

The scraper is using israeli-bank-scrapers. We'll need to compose the credentials according to company names and fields specified in the scraper definition file.

The resulting JSON should be an array of objects containing company (string) and credentials (object according to the definition),
Example file:

[
{"company":"hapoalim", "credentials":{"userCode": "123456", "password": "VerySecret"}},
{"company":"amex","credentials":{ "id": "7890", "card6Digits":"234567", "password": "SecretStuff"}}
]
Same file, in a prettier display:
[
  {
    "company": "hapoalim",
    "credentials": {
      "userCode": "123456",
      "password": "VerySecret"
    }
  },
  {
    "company": "amex",
    "credentials": {
      "id": "7890",
      "card6Digits": "234567",
      "password": "SecretStuff"
    }
  }
]

3.a. Fork money-tiger-scraper on GitHub

  1. Open the repo and click "fork". Choose a private repository.
  2. Go to the forked repository's settings, and there to "Secrets and Variables > Actions"
  3. Create two new secrets:
    1. API_TOKEN, place the value from section #1
    2. CONFIG, place the JSON from section #2
  4. Navigate to the "actions" tab. Choose the "Scrape" action.
    1. Click on "Run Workflow", and then "Run Workflow". Keep the main branch selected.
    2. Wait for the job to complete. It should be green.

You should now have transactions present in the 🐯 Transactions page.
The task will run daily and collect new transactions.

3.b. Run money-tiger-scraper-docker

Instead of running the scraper in GitHub actions, you can run it locally.
It's a NodeJS application using the Puppeteer framework.

  1. Fork the repository, e.g.

    git clone https://github.com/BackSlasher/money-tiger-scraper-docker
    
  2. Install requirements

    npm ci
    
  3. Prepare the import token and JSON config as environment variables.
    CONFIG can either be the JSON itself, or a path to the JSON file.

    export API_TOKEN=fk5p4P3m3nqM5nOk3tXpBMnLnch9jqp7KzXwlVOF
    export CONFIG=config.json
    
  4. Optionally, set SHOW_BROWSER as well to see the scraping in action

    export SHOW_BROWSER=1
    
  5. Run the scraper

    node src/index.js
    

You should now have transactions present in the 🐯 Transactions page.
You'll probably want to run this periodically to collect new transactions. Consider using cron.