From: Dan Scott Date: Tue, 7 Apr 2020 17:04:44 +0000 (-0400) Subject: Use the HTTPS version of Scholars Portal books X-Git-Url: https://old-git.evergreen-ils.org/?a=commitdiff_plain;h=2c66dcd1b60a930a3774a51b47eddf5eaab09cfc;p=contrib%2FConifer.git Use the HTTPS version of Scholars Portal books Signed-off-by: Dan Scott --- diff --git a/tools/ebooks/prep_ebook_records.py b/tools/ebooks/prep_ebook_records.py index 220a1a272d..7786453e2f 100755 --- a/tools/ebooks/prep_ebook_records.py +++ b/tools/ebooks/prep_ebook_records.py @@ -1289,6 +1289,12 @@ def get_subfields(field, data, platform): subs = [] url = field["u"] + # Let's get to HTTPS whenever possible + if url.startswith("http://books.scholarsportal.info"): + url = url.replace( + "http://books.scholarsportal.info", "https://books.scholarsportal.info" + ) + # Is this an ebrary URL? ebrary = False if url.find(".ebrary.com") > -1: @@ -1305,9 +1311,9 @@ def get_subfields(field, data, platform): subs.extend(["u", url]) else: if data["ebrary_code"] == "ocls" and re.search(r"ra.ocls.ca", field["u"]): - subs.extend(["u", field["u"]]) + subs.extend(["u", url]) else: - subs.extend(["u", data["proxy"] + field["u"]]) + subs.extend(["u", data["proxy"] + url]) # Check for a $z as the first 856; in Springer records, at least, this # indicates a multi-volume set that requires keeping the $z around