# 2025.02.12 - [sendnow] Add send.now as download host
# 2025.02.11 - [ranoz] Fix filename (to handle fileid added to download urls) # 2025.02.10 - [mad] Add detection of custom "Removed" response on cdn get from direct links # 2025.02.06 - [ranoz] Add UNAVAILABLE_FOR_LEGAL_REASONS response handling # 2025.02.04 - [mad] Add ConnectTimeoutUpload to separate configurable up/down timeouts
This commit is contained in:
parent
fd4723eb24
commit
0face871aa
12 changed files with 1359 additions and 561 deletions
|
|
@ -1,6 +1,6 @@
|
|||
#! Name: ranoz.sh
|
||||
#! Author: kittykat
|
||||
#! Version: 2025.02.02
|
||||
#! Version: 2025.02.11
|
||||
#! Desc: Add support for downloading and processing of urls for a new host
|
||||
#! Usage: Copy this file into the ./${ScriptDir}/hosts/ folder
|
||||
#!
|
||||
|
|
@ -104,7 +104,7 @@ rz_FetchFileInfo() {
|
|||
continue
|
||||
fi
|
||||
fi
|
||||
if grep -Eqi "There is no such file|File was deleted because" <<< "$response"; then
|
||||
if grep -Eqi "There is no such file|UNAVAILABLE_FOR_LEGAL_REASONS|File was deleted because" <<< "$response"; then
|
||||
printf "\\n"
|
||||
echo -e "${RED}| The file was not found. It could be deleted or expired.${NC}"
|
||||
exitDownloadError=true
|
||||
|
|
@ -119,7 +119,7 @@ rz_FetchFileInfo() {
|
|||
return 1
|
||||
fi
|
||||
if [ "$filename_override" == "" ] ; then
|
||||
filename=$(grep -oP '(?<=<div class\="page_box_category__.....">Name</div><div class\="page_box_value__.....">).*?(?=</div>.*$)' <<< "$file_header")
|
||||
filename=$(grep -oP '(?<=\[\\"\$\\",\\"title\\",\\"2\\",\{\\"children\\":\\").*?(?=\\"\}\],.*$)' <<< "$response")
|
||||
fi
|
||||
if grep -Eqi '\\"props\\":\{\}\},\\"href\\":\\"' <<< "$response"; then
|
||||
printf "\\n"
|
||||
|
|
@ -132,7 +132,9 @@ rz_FetchFileInfo() {
|
|||
url_token=${url_postfix##*\?}
|
||||
url_enc_fname=$(urlencode_literal_grouped_case ${url_fname})
|
||||
download_url="${url_prefix}/${url_enc_fname}?${url_token}"
|
||||
filename=$url_fname
|
||||
if [[ "$filename_override" == "" ]] && [[ -z "$filename" ]] ; then
|
||||
filename=$url_fname
|
||||
fi
|
||||
break
|
||||
else
|
||||
if [ $i == $maxfetchretries ] ; then
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue