Simple parser of Sberbank, using selenium
Project description
Py_parse_sber
Overview
It's simple parser of Sberbank, using selenium (firefox geckodriver), where you can see your account currency and transactions for some period.
Getting Started
For the program to work, you must disable two-factor authorization on the sberbank-online website, otherwise the program will not work
Requirements
Python 3.6+
Install
The quick way:
pip install py-parse-sber
Desired way:
python3 -m venv venv
source venv/bin/activate
pip install py-parse-sber
Preparing:
Install geckodriver
Download geckodriver and unzip it Make sure it’s in your PATH, e. g., place it in /usr/bin or /usr/local/bin.
Failure to observe this step will give you an error selenium.common.exceptions.WebDriverException: Message: ‘geckodriver’ executable needs to be in PATH.
Run receiving web server
Py_parse_sber will send parsed info to web server. See contracts detail in contracts.yml, which your web server will have to implement for accepting data correct. (for standard was taken project BudgetTracker and his api)
Requirement environment variables
LOGIN # your sberbank account login
PASSWORD # your sberbank account password
SERVER_URL # main URL where the data will be sent. Example: localhost (or service name in docker-compose.yml)
SEND_ACCOUNT_URL # url 'path' part, where account information will be sent. Example: /send_account
SEND_PAYMENT_URL # url 'path' part, where transaction information will be sent. Example: /send_payment
Optional environment variables
SERVER_SCHEME # Scheme of SERVER_URL, http/https. Default http
SERVER_PORT # Port of SERVER_URL. Default 80
DAYS # period in days to indicate parser restart. Can be used with HOURS.
HOURS # period in hours to indicate parser restart. Can be used with DAYS.
If any of their not set - used 1 day by default.
Linux example
export LOGIN=login
export PASSWORD=password
export SERVER_URL=localhost
export SERVER_PORT=8080
export SEND_ACCOUNT_URL=/send_account
export SEND_PAYMENT_URL=/send_payment
py_parser_sber_run_once # for one-time launch
# or
py_parser_sber_run_infinite # for run in loop with a given period
Docker-compose example
$ cat .env
LOGIN=<login>
PASSWORD=<password>
SERVER_URL=example.com
SERVER_SCHEME=https
SERVER_PORT=80
SEND_ACCOUNT_URL=/send_account
SEND_PAYMENT_URL=/send_payment
DAYS=1
$ cat docker-compose.yml
version: '3.4'
services:
py_parse_sber:
image: niccolum/py_parse_sber/py_parse_sber:latest
env_file:
- .env
volumes:
- ./:/opt/app
Also see dev example docker-compose.yml
Authors
- Nikolai Vidov - maintainer - Niccolum
License
This project is licensed under the MIT License - see the LICENSE.md file for details
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
File details
Details for the file py_parser_sber-0.7.0.tar.gz
.
File metadata
- Download URL: py_parser_sber-0.7.0.tar.gz
- Upload date:
- Size: 13.9 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.1.1 pkginfo/1.5.0.1 requests/2.23.0 setuptools/41.2.0 requests-toolbelt/0.9.1 tqdm/4.45.0 CPython/3.7.6
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 9b2bd5e84378077d3e15bf71748344b5db1ecc8964bb65a3fc363602be487cf2 |
|
MD5 | 3a8ba78b8cf3f1fe001c5e29f3021993 |
|
BLAKE2b-256 | 3883083a868c2c8b7d5e969c306bfc717eff230b1ddce48fee3bf360a1e0a97e |
File details
Details for the file py_parser_sber-0.7.0-py3-none-any.whl
.
File metadata
- Download URL: py_parser_sber-0.7.0-py3-none-any.whl
- Upload date:
- Size: 14.4 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.1.1 pkginfo/1.5.0.1 requests/2.23.0 setuptools/41.2.0 requests-toolbelt/0.9.1 tqdm/4.45.0 CPython/3.7.6
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 3ca6e96d989e49cb7cc524298aef46c942d1d284d8c5db775d31e61268900259 |
|
MD5 | 1c20d5470c0f3c1656ba9c0e07a62c62 |
|
BLAKE2b-256 | bdd8c5b7c4438829c4c3ce0e28561f0c89a7a9dfadc5757c3b65840356038660 |