ypypy28 / parsix

Election commissions parser

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Parsix – парсер избирательных комиссий

A simple parser of Russian election commissions from the official website. Use it to get names of members and locations of the election commissions in the chosen region of Russia.

To start using this parser you have to install chrome webdriver if you don't already have it.

Usage

Simple usage:

parsix --region=ivanovo

By default, you will get the data in two separate CSV files inside the directory named out in your current directory. You can pass an --output-dir argument with the path to a specific directory for the output files. Each file will have current date as a part of the name, one file is for the data of precinct election commissions and another is for higher election commissions. You will be able to upload these CSV-files in the Google Maps.

Installation

To use it as a cli tool run this commands

git clone https://github.com/ypypy28/parsix.git
cd parsix
pip install . --user

Installation for development

  1. Install chrome webdriver (and Chrome or Chromium web browser if you don't already have it)
  2. Clone this project into your local directory of choice
git clone https://github.com/ypypy28/parsix.git
cd parsix
  1. Install dependencies in virtual environment
pipenv sync --dev
  • or with out of box pip on *nix-systems
python3 -m venv venv
source ./venv/bin/activate
pip install -e .
  • or with pip in powershell on windows
python -m venv venv
.\venv\Scripts\activate.ps1
pip install -e .
  1. Now you should be able to run parsix as a module from your virtual environment
python3 -m parsix --region=ivanovo

or like a regular cli application because of the installation in editable mode

parsix --region=ivanovo

Build

If you want to build a package, you can do it with a simple command

pipenv run build

About

Election commissions parser

License:MIT License


Languages

Language:Python 100.0%