From 806b1a439f32b9f8fa5ebee4b53ab363deb928ed Mon Sep 17 00:00:00 2001 From: Martin Wimpress Date: Sat, 20 Apr 2024 11:01:00 +0100 Subject: [PATCH] feat: add web_check(); a replacement for wget --spider --- quickget | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/quickget b/quickget index 241465f..f97b5f3 100755 --- a/quickget +++ b/quickget @@ -1529,6 +1529,12 @@ function web_redirect() { fi } +function web_check() { + local URL="" + URL=$(web_redirect "${1}") + curl --silent --location --head --output /dev/null --fail "${URL}" +} + function zsync_get() { local DIR="${2}" local FILE="${1##*/}"