Created
August 13, 2021 05:58
-
-
Save boldfield/3150ae864a2d9d508d15f8a0cfde34b1 to your computer and use it in GitHub Desktop.
Script to retrieve all WA covid breakthrough reports available from the Way Back Machine
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 | |
WAYBACK_URL="http://timetravel.mementoweb.org/timemap/json/https://www.doh.wa.gov/Portals/1/Documents/1600/coronavirus/data-tables/420-339-VaccineBreakthroughReport.pdf" | |
for item in $(curl "$WAYBACK_URL" | jq -r '.mementos.list[] | .datetime, .uri') | |
do | |
if [[ -z $date ]] | |
then | |
date=$(echo $item | sed 's|2021-\([0-9][0-9]-[0-9][0-9]\).*|\1|g') | |
else | |
curl "$item" --output "${date}-420-339-VaccineBreakthroughReport.pdf" | |
date="" | |
fi | |
done |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment