Update wrapper.py
This commit is contained in:
parent
f03a9e786e
commit
5f73504beb
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user