Last active
December 29, 2020 06:55
-
-
Save wcaleb/218d210687546c8efd0a to your computer and use it in GitHub Desktop.
Revisions
-
wcaleb revised this gist
Oct 22, 2015 . 1 changed file with 3 additions and 1 deletion.There are no files selected for viewing
This file contains hidden or 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 charactersOriginal file line number Diff line number Diff line change @@ -10,4 +10,6 @@ if r.status_code == requests.codes.ok: print base_url + r.headers['content-location'] else: print 'Error in response: ' + str(r.status_code) # or you could just return the original url # print sys.argv[1] -
wcaleb revised this gist
Oct 22, 2015 . 1 changed file with 1 addition and 1 deletion.There are no files selected for viewing
This file contains hidden or 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 charactersOriginal file line number Diff line number Diff line change @@ -2,7 +2,7 @@ import sys, requests # Usage: Pass URL to script, get back URL to Wayback Machine snapshot base_url = 'http://web.archive.org' r = requests.get(base_url + '/save/' + sys.argv[1]) -
wcaleb created this gist
Oct 22, 2015 .There are no files selected for viewing
This file contains hidden or 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 charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,13 @@ #! /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)