From 2a7a4ea6dc59e66bc9af4d89a1705bd9736ab3af Mon Sep 17 00:00:00 2001 From: JustAnotherArchivist Date: Mon, 6 May 2019 23:19:36 +0000 Subject: [PATCH] Fix HTTPS handling --- archivebot-blogspot | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/archivebot-blogspot b/archivebot-blogspot index 723af52..e95b35c 100755 --- a/archivebot-blogspot +++ b/archivebot-blogspot @@ -4,9 +4,13 @@ scriptpath="$(cd "$(dirname "$0")"; pwd -P)" if [[ "$1" =~ ^http ]] then url="$1" + url="${url/http:/https:}" + pattern="${url//./\\.}" + pattern="${pattern/https:/https?:}" else url="https://${1}.blogspot.com/" + pattern="https?://${url//./\\.}/" fi echo "!a ${url}" -echo "!ig $("${scriptpath}/archivebot-jobid-calculation" "${url}") ^${url//./\\.}search\?(.*&)?reverse-paginate=true(&|$)" +echo "!ig $("${scriptpath}/archivebot-jobid-calculation" "${url}") ^${pattern}search\?(.*&)?reverse-paginate=true(&|$)"