Giter VIP home page Giter VIP logo

israeli-finance-scraper's Introduction

Introduction

Scripts to help scrape financial data from israeli bank and credit card providers, archive it and optionally send it to YNAB. Transactions can currently be stored in a Google Cloud Platform firestore database. Based on israeli-bank-scrapers.

Getting Started

  1. Create firestore account
  2. Place firebase-service-account.json file in root dir
  3. Install all dependencies using yarn install
  4. Run yarn configure to configure your scrapers and optional YNAB integration
  5. That's it!

Available Commands (NPM Scripts)

  1. scrape - run all scrapers for all stored configurations, and save them to firestore.
  2. uploadToYnab - Upload to YNAB (Valid YNAB API key required)
  3. startBot - Start a telegram bot. See required env vars below
  4. startWeb - Starts a web server that starts a scrape when receiving a POST to the root address, sending logs to a telegram user indicated by CHAT_ID env var. Does not require a running telegram bot. Good for scheduled tasks.
  5. configure - Create or edit user configurations.

Supported Telegram bot commands

  1. /tx [number of days] - print a summary of all transactions in the last few days. Default number of days is 5.
  2. /scrape - trigger a scrape and upload to YNAB.

Heroku integration (Optional)

Heroku is supported.

  1. Create an heroku app, and set the required env vars marked Required for heroku integration.
  2. Add the Puppeteer buildpack.

Environment Variables

  1. ONLY_PROVIDERS - [Optional] Comma delimited list. Scraper types to run.
  2. ONLY_ACCOUNTS - [Optional] Comma delimited list. Scraper accounts to run.
  3. MONTHS_TO_SCRAPE - [Optional] Number of months to scrape/upload to ynab. Period always start from the start of the month. (i.e. Passing 0 means to just start at current month)
  4. BOT_TOKEN - (Required for telegram bot) - Bot token, as obtained from the telegram @botfather
  5. CHAT_ID - (Required for telegram bot) - Telegram user to receive logs from the telegram bot "scrape" command
  6. GOOGLE_CREDENTIALS - (Required for heroku integration) - A base 64 version of the firebase-service-account.json file.
  7. HEROKU_ADDRESS - (Required for heroku integration + running a telegram bot) - Full address pointing to heroku app. (e.g. https://awesome-scraper.herokuapp.com )
  8. WEBSERVER_PORT - [Optional] When running in web server mode (or via docker), the port to use. defaults to 9000

israeli-finance-scraper's People

Contributors

maormagori avatar erikash avatar orzarchi avatar dependabot[bot] avatar

israeli-finance-scraper's Issues

Build: Accommodate for the GCP environment

Using the Cloud Scheduler, this scraper will run on the GCP as a cron job.
Whether it'd be a Cloud Function or a Cloud Run is up to debate but a few things will have to change to accommodate the new environment. The first task that would need to be done and will create follow-up tasks is removing the mentions of AWS and lambda functions.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.