From d97ea22fc1177858dc11af2ebceadec57b5a2cf3 Mon Sep 17 00:00:00 2001 From: kittykat Date: Fri, 8 Nov 2024 10:07:54 +0000 Subject: [PATCH] v2024.11.08 --- hosts/up2share.sh | 7 ++++--- mad.sh | 4 +++- 2 files changed, 7 insertions(+), 4 deletions(-) mode change 100755 => 100644 hosts/up2share.sh mode change 100755 => 100644 mad.sh diff --git a/hosts/up2share.sh b/hosts/up2share.sh old mode 100755 new mode 100644 index 926f8ea..6342a68 --- a/hosts/up2share.sh +++ b/hosts/up2share.sh @@ -1,6 +1,6 @@ #! Name: up2share.sh #! Author: kittykat -#! Version: 2024.09.13 +#! Version: 2024.11.08 #! Desc: Add support for downloading and processing of urls for a new host #! Usage: Copy this file into the ./${ScriptDir}/hosts/ folder #! @@ -170,7 +170,7 @@ up2share_FetchFileInfo() { return 1 fi if grep -Eqi 'start automatically, click here)' <<< "$response") + download_url="https://up2sha.re"$(grep -oPi '(?<=start automatically, click here)' <<< "$response") printf "\\n" break else @@ -244,7 +244,8 @@ up2share_FetchFileInfo() { fi fi fi - file_size_bytes=$(grep -oPi '(?<=content-length: ).*' <<< "$file_header") + subSearch=$(awk '/content-type: application\/octet-stream/,/content-transfer-encoding: binary/' <<< "$file_header") + file_size_bytes=$(grep -oPi '(?<=content-length: ).*?(?=$)' <<< "$subSearch") file_size_bytes=${file_size_bytes//[$'\t\r\n']} if [[ -z "$file_size_bytes" ]]; then if [ $j == $maxfetchretries ] ; then diff --git a/mad.sh b/mad.sh old mode 100755 new mode 100644 index 221ecb2..ff3e439 --- a/mad.sh +++ b/mad.sh @@ -31,9 +31,11 @@ # * klonkerz - feedback and suggestions, url only processing # * Everyone who provided feedback and helped test.. and those who wish to remain anonymous -ScriptVersion=2024.11.06 +ScriptVersion=2024.11.08 #================================================= # Recent Additions +# 2024.11.08 - [up2share] Fix download url (https) +# 2024.11.08 - [up2share] Fix advertised filesize on a redirection # 2024.11.06 - [SkipUrlsInDownloadsCompletedTxt] Fix blank url check # 2024.11.06 - [ranoz] Add ranoz.gg as download host # 2024.11.05 - [up_ranoz] Add ranoz.gg as upload host