From 5f73504beb40203d29919c7ba72dd0c6ab474da8 Mon Sep 17 00:00:00 2001 From: akamhy <64683866+akamhy@users.noreply.github.com> Date: Sat, 2 May 2020 15:15:36 +0530 Subject: [PATCH] Update wrapper.py --- pywayback/wrapper.py | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) 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