Skip to content

Instantly share code, notes, and snippets.

@ThomasG77
Created December 6, 2021 20:36
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save ThomasG77/fdd290466b27483228fe90a7c3921f15 to your computer and use it in GitHub Desktop.
Save ThomasG77/fdd290466b27483228fe90a7c3921f15 to your computer and use it in GitHub Desktop.
current_date=$(date +%Y-%m-%d)
curl "https://www.metoffice.gov.uk/weather/warnings-and-advice/uk-warnings#?date=${current_date}" \
| grep "window.metoffice.warnings.geojson" \
| sed 's/window.metoffice.warnings.geojson = \|;$//g' \
>| "/tmp/metoffice-${current_date}.json"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment