#! /usr/bin/env python import sys, requests # Usage: Pass URL to script, get back URL to Wayback Machine snapshots base_url = 'http://web.archive.org' r = requests.get(base_url + '/save/' + sys.argv[1]) if r.status_code == requests.codes.ok: print base_url + r.headers['content-location'] else: print 'Error in response: ' + str(r.status_code)