Web scraping-- Election_scraper

Job ID: 36728397

Budget: €30 – €250 EUR

Project description
The final project will test your knowledge not only from the last lessons, but from the entire course. Your task will be to create a 2017 election results scraper that pulls data directly from the web.

Write such a script that selects any territorial entity from this link (https://volby.cz/pls/ps2017nss/ps3?xjazyk=CZ) for example X at Benešov refers here(https://volby.cz/pls/ps2017nss/ps32?xjazyk=CZ&xkraj=2&xnumnuts=2101).
You want to scrape the voting results for all municipalities from this link (or use the X in the Precinct Selection column).


How to do it
You will create your own virtual environment on your computer (specifically for this task)
You install the necessary third-party libraries into the newly created environment via the IDE (or the command line).
You will generate a requirements.txt file that contains a list of all libraries and their versions (do not write them manually!)
You will run the resulting file with 2 arguments (not with the input function). The first argument contains the link to which territorial unit you want to scrap (e.g. territorial unit Prostejov(https://volby.cz/pls/ps2017nss/ps32?xjazyk=CZ&xkraj=12&xnumnuts=7103) ), the second argument contains the name of the output file (e.g. vysledky_prostejov.csv)
If the user does not enter both arguments (either in the wrong order or an argument that does not contain the correct link), the program will warn them and not continue.
Then add the README.md file, which will introduce the user to your project. How to install the necessary libraries from the requirements.txt file, how to run your file, or add a demo where you demonstrate your code on a specific link with a specific listing.
The project will contain
First, describe your file with a header so that we can contact you more easily:
Code sample1
COPY THE CODE
"""
project_3.py: the third project for the Engeto Online Python Academy
author: Petr Svetr
email: petr.svetr..gmail.com
discord: Petr Swetr#4490
"""
import...
A file with a program (.py) that needs 2 arguments at startup to run correctly
Library and version list file (requirements.txt)
Brief documentation (description, installation of libraries, example) (README.md)
Saved output file (.csv)
The output will contain
In the output (.csv file), each line contains information for a specific municipality. Thus the form:

municipality code
name of the village
voters in the list
issued envelopes
valid votes
candidate parties (per column, the number of votes for the party for all parties).
Sample output .csv file: