(url)
Capture url in Web Archive
Capture url in Web Archive
Capture url in Web Archive
def capture(url):
        """
        Capture url in Web Archive
        """
        # Copied from https://github.com/motherboardgithub/mass_archive/blob/master/mass_archive.py
        res = requests.get("https://web.archive.org/save/%s" % url)
        if res.status_code == 200:
            result = res.headers['Content-Location']
            internet_archive_url = "https://web.archive.org%s" % result
            return internet_archive_url
        else:
            raise Exception("Capture failed")
def capture ( url ) : # Copied from https://github.com/motherboardgithub/mass_archive/blob/master/mass_archive.py res = requests . get ( "https://web.archive.org/save/%s" % url ) if res . status_code == 200 : result = res . headers [ 'Content-Location' ] internet_archive_url = "https://web.archive.org%s" % result return internet_archive_url else : raise Exception ( "Capture failed" )