Skip to content

Instantly share code, notes, and snippets.

@boldfield
Created August 13, 2021 05:58
Show Gist options
  • Save boldfield/3150ae864a2d9d508d15f8a0cfde34b1 to your computer and use it in GitHub Desktop.
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
#!/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