diff --git a/filecloud.sh b/filecloud.sh index 339fb964..fde801a1 100644 --- a/filecloud.sh +++ b/filecloud.sh @@ -130,6 +130,9 @@ filecloud_download() { else PAGE=$(curl -L $AUTH_COOKIE -c "$COOKIE_FILE" "$URL") || return + if match 'The file at this URL was either removed or did not exist in the first place' "$PAGE" ; then + return $ERR_LINK_DEAD + fi ERROR_CODE=$(parse 'var __error' '__error[[:space:]]*=[[:space:]]*\([^;]\+\)' <<< "$PAGE") || return diff --git a/mediafire.sh b/mediafire.sh index 5a2041a3..50bc8b86 100644 --- a/mediafire.sh +++ b/mediafire.sh @@ -225,7 +225,6 @@ mediafire_download() { # Only get site headers first to capture direct download links URL=$(curl --head "$BASE_URL/?$FILE_ID" | grep_http_header_location_quiet) || return - case "$URL" in # no redirect, normal download '') @@ -245,6 +244,10 @@ mediafire_download() { *errno=999) return $ERR_LINK_NEED_PERMISSIONS ;; + *errno=320\&origin=download) + return $ERR_LINK_DEAD + ;; + *errno=320|*errno=378) return $ERR_LINK_DEAD ;;