crawl.sh 1.5 KB

1234567891011121314151617181920212223242526
  1. !#/bin/env bash
  2. # FIXME this loop is only run once, but it works
  3. for i in {2006..2024}; do
  4. echo "Downloading Personen Spenden for $i"
  5. 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"
  6. if [ $? -ne 0 ]; then
  7. echo "Failed to download juristische_$i.csv"
  8. fi
  9. echo "Downloading nat Spenden for $i"
  10. 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"
  11. if [ $? -ne 0 ]; then
  12. echo "Failed to download nat_$i.csv"
  13. fi
  14. done
  15. # echo "Combining all Years"
  16. # if ls nat*.csv 1>/dev/null 2>&1; then
  17. # cat nat*.csv | sort
  18. # fi
  19. # if ls juristische*.csv 1>/dev/null 2>&1; then
  20. # cat juristische*.csv | sort
  21. # fi