Created
February 26, 2024 18:09
-
-
Save aborruso/ee5bffcd7eb3b36606e7d0c5f9006275 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
URL="https://elezioniregionali2024.regione.sardegna.it/risultati-per-comune" | |
curl -A "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/58.0.3029.110 Safari/537.3" "$URL" | \ | |
awk '/origin_data/,/};/ {print; if (/};/) exit}' | \ | |
sed '1s/var origin_data = //; $s/;$//' >elezioni_sardegna_dati_per_comune.json |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment