Last active
February 23, 2022 12:43
-
-
Save cventour/7498c712de8a9aefffffc3132e5bb0d5 to your computer and use it in GitHub Desktop.
Extract covid19.gov.gr infections stats (whole history)
This file contains hidden or 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/sh | |
curl https://covid19.innews.gr | gunzip > covid.html | |
cat covid.html | grep daily_stats | cut -d "=" -f2 | sed 's/^.//;s/.$//' > daily_stats.json | |
cat covid.html | grep weekly_stats | cut -d "=" -f2 | sed 's/^.//;s/.$//' > weekly_stats.json | |
cat covid.html | grep three_days_stats | cut -d "=" -f2 | sed 's/^.//;s/.$//' > three_days_stats.json | |
cat covid.html | grep last_stats | cut -d "=" -f2 | sed 's/^.//;s/.$//' > today_stats.json | |
cat covid.html | grep total_stats | cut -d "=" -f2 | sed 's/^.//;s/.$//' > total_stats.json | |
rm covid.html |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Even better: