Results parser working for all LGAs (except melbourne)
This commit is contained in:
@@ -1,5 +1,15 @@
|
||||
#!/bin/bash
|
||||
|
||||
council_name=boroondara-city-council
|
||||
mkdir -p html
|
||||
wget https://www.vec.vic.gov.au/results/2024-council-election-results -O html/lga_list.html
|
||||
|
||||
wget https://www.vec.vic.gov.au/voting/2024-local-council-elections/$council_name/results -O $council_name
|
||||
IFS=$'\n'
|
||||
|
||||
lgas=$(grep 'href="/voting/.*/results"' html/lga_list.html)
|
||||
|
||||
for lga in $lgas ; do
|
||||
lga=$(sed 's|.*href="|https://www.vec.vic.gov.au|' <<< $lga)
|
||||
lga=$(sed 's|">.*||' <<< $lga)
|
||||
file=$(sed 's|.*elections/||' <<< $lga | sed s'|/results||')
|
||||
wget $lga -O html/$file
|
||||
done
|
||||
|
||||
Reference in New Issue
Block a user