Update wrapper.py
This commit is contained in:
parent
8acb14a243
commit
a6cb955669
@ -17,8 +17,8 @@ def clean_url(url):
|
|||||||
def save(url,UA=default_UA):
|
def save(url,UA=default_UA):
|
||||||
base_save_url = "https://web.archive.org/save/"
|
base_save_url = "https://web.archive.org/save/"
|
||||||
request_url = (base_save_url + clean_url(url))
|
request_url = (base_save_url + clean_url(url))
|
||||||
hdr = { 'User-Agent' : '%s' % UA }
|
hdr = { 'User-Agent' : '%s' % UA } #nosec
|
||||||
req = Request(request_url, headers=hdr)
|
req = Request(request_url, headers=hdr) #nosec
|
||||||
if "." not in url:
|
if "." not in url:
|
||||||
raise InvalidUrl("'%s' is not a vaild url." % url)
|
raise InvalidUrl("'%s' is not a vaild url." % url)
|
||||||
try:
|
try:
|
||||||
|
Loading…
Reference in New Issue
Block a user