Siehe hier für die deutsche Anleitung.
Small utility programs to use the abgeordnetenwatch-api in python.
To use this script, install python3 and pip.
pip install abgeordnetenwatch-pythonYou can download all questions and answers from a politician with the following script:
# -v for verbose output
load_questions_answers --firstname "Angela" --lastname "Merkel"
# for more options
load_questions_answers --helpThis will create a file data/json/079137_Angela_Merkel.json with all questions and answers of the specified person.
Convert json files to txt:
convert_qa data/json data/txt txt
# convert to csv
convert_qa data/json data/csv csvThis will create a file data/txt/079137_Angela_Merkel.txt (for all files in data/json).
To fetch all questions and answers from all politicians from a parliament, you can do the following:
# load "bundestag" using 16 requests simultaneously
load_parliament_qa bundestag -t 16
# for more options
load_parliament_qa --help