Skip to content

Instantly share code, notes, and snippets.

@bdesham
bdesham / submit_urls.py
Last active December 4, 2022 17:45
Takes a sitemap file and submits each URL to the Wayback Machine
#!/usr/bin/env python3
# Takes a sitemap file [1] and submits each URL to the Wayback Machine [2].
#
# Usage: python3 submit_urls.py sitemap.xml
#
# The script will contact the Wayback Machine for each URL in turn and request
# that it be saved [3]. The script prints (to standard output) the HTTP status
# code received from the Wayback Machine for each URL. The output looks like
# this: