diff --git a/pywayback/wrapper.py b/pywayback/wrapper.py index 5baf7cd..fef4d01 100644 --- a/pywayback/wrapper.py +++ b/pywayback/wrapper.py @@ -1,18 +1,19 @@ # -*- coding: utf-8 -*- + from datetime import datetime from urllib.request import Request, urlopen import urllib.error -# YYYYMMDDhhmmss - class TooManyArchivingRequestsError(Exception): - """An error when a single url is archived multiple times in a short timespam. - Wayback machine doesn't supports archivng any url too many times in a short period of time. + """Error when a single url reqeusted for archiving too many times in a short timespam. + Wayback machine doesn't supports archivng any url too many times in a short period of time. """ + class ArchivingNotAllowed(Exception): pass + def save(url,UA="pywayback python module"): base_save_url = "https://web.archive.org/save/" request_url = base_save_url + url