From 38f0db07b52ed4848a733057d802630569d58889 Mon Sep 17 00:00:00 2001 From: squidbear <379651+czarly@users.noreply.github.com> Date: Sun, 23 Mar 2025 12:08:14 +0100 Subject: [PATCH] only accept 200 --- multicurl.sh | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/multicurl.sh b/multicurl.sh index 8be70436..77c92ce5 100755 --- a/multicurl.sh +++ b/multicurl.sh @@ -40,17 +40,13 @@ done output="" for url in "${urls[@]}"; do #echo "curl -s ${options[@]} $url" - output=$(eval "curl -s ${options[@]@Q} '$url'") + output=$(eval "curl -s ${options[@]@Q} '$url' --fail-with-body") if [[ $? -eq 0 ]]; then if cat "$temp_file" | jq -e 'has("error")' > /dev/null 2>&1; then continue # Try the next URL fi - if [[ $output -ne 200 ]]; then - continue - fi - if [ -n "$original_output" ]; then #echo "$(cat $temp_file)" cat "$temp_file" > "$original_output"