Created
September 28, 2023 10:23
-
-
Save rrampage/d4b286091f9a9b9d0b287a53836077ff to your computer and use it in GitHub Desktop.
Search wayback machine for URL
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 | |
# Search Wayback machine for a particular URL | |
# Add to your ~/.bashrc or ~/.bash_profile | |
# Needs `jq` and `curl` to work | |
if [[ -z $1 ]]; then | |
echo "Usage: $0 URL"; | |
else | |
curl "http://web.archive.org/cdx/search/cdx?url=$1*&output=json&fl=original,timestamp" 2> /dev/null | jq '.[1:][] |"https://web.archive.org/web/" +.[1] + "/" + .[0]' 2> /dev/null; | |
fi |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment