VALID_LOCATIONS='
Albany
+ Allegany
Broome
+ Clinton
Delaware
Dutchess
Erie
Monroe
Montgomery
Nassau
- New York City:
+ New York City
New York State (Outside of NYC)
+ Onondaga
+ Ontario
Orange
Putnam
+ Rensselaer
Rockland
Saratoga
Schenectady
Suffolk
+ Sullivan
Tioga
Tompkins
Total Positive Cases (Statewide)
Ulster
Westchester
+ Wyoming
'
-DEFAULT_LOCATION='New York City:'
+DEFAULT_LOCATION='New York City'
usage() {
printf "Usage: %s [LOCATION]\n" "$0"
* ) location="$1";;
esac
-curl 'https://health.ny.gov/diseases/communicable/coronavirus/' \
+# 2020-03-16
+#URI='https://health.ny.gov/diseases/communicable/coronavirus/'
+
+# 2020-03-17
+URI='https://coronavirus.health.ny.gov/county-county-breakdown-positive-cases'
+
+curl "$URI" \
| hxpipe \
| awk -v location="$location" '
BEGIN {
#target_path = "/html/body/div/div/div/div/div/div/table/tr/td"
# 2020-03-16 late evening 22:30
- target_path = "/html/body/div/div/div/div/div/div/tr/td"
+ #target_path = "/html/body/div/div/div/div/div/div/tr/td"
+
+ # 2020-03-17 late afternoon 16:35
+ target_path = "/html/body/div/div/main/div/div/div/div/div/div/div/div/table/tbody/tr/td"
}
/^[\(\)]/ {