1234567891011121314151617181920212223242526 |
- !#/bin/env bash
- # FIXME this loop is only run once, but it works
- for i in {2006..2024}; do
- echo "Downloading Personen Spenden for $i"
- curl -o juristische_$i.csv -v "https://lobbypedia.de/wiki/Spezial:Semantische_Suche/-5B-5BKategorie:Parteispende-5D-5D-20-5B-5BParteispende-2FKategorie::juristische-20Person-5D-5D-20-5B-5BJahr::$i-5D-5D/-3FGeldgeber/-3FParteispende-2FKategorie%3DKategorie/-3FBetrag/-3FEmpf%C3%A4nger/-3FJahr-23-2Dn/-3FOrt/-3FBundesland/-3FBranche/-3FSchlagworte/mainlabel%3D/limit%3D10000/order%3Ddescending/sort%3DModification-20date/offset%3D0/format%3Dcsv/default%3Dkeine-20Ergebnisse-20mit-20der-20aktuellen-20Auswahl"
- if [ $? -ne 0 ]; then
- echo "Failed to download juristische_$i.csv"
- fi
- echo "Downloading nat Spenden for $i"
- curl -o nat_$i.csv -v "https://lobbypedia.de/wiki/Spezial:Semantische_Suche/-5B-5BKategorie:Parteispende-5D-5D-20-5B-5BParteispende-2FKategorie::nat%C3%BCrliche-20Person-5D-5D-20-5B-5BJahr::$i-5D-5D/-3FGeldgeber/-3FParteispende-2FKategorie%3DKategorie/-3FBetrag/-3FEmpf%C3%A4nger/-3FJahr-23-2Dn/-3FOrt/-3FBundesland/-3FBranche/-3FSchlagworte/mainlabel%3D/limit%3D10000/order%3Ddescending/sort%3DModification-20date/offset%3D0/format%3Dcsv/default%3Dkeine-20Ergebnisse-20mit-20der-20aktuellen-20Auswahl"
- if [ $? -ne 0 ]; then
- echo "Failed to download nat_$i.csv"
- fi
- done
- # echo "Combining all Years"
- # if ls nat*.csv 1>/dev/null 2>&1; then
- # cat nat*.csv | sort
- # fi
- # if ls juristische*.csv 1>/dev/null 2>&1; then
- # cat juristische*.csv | sort
- # fi
|