From 6d766bf31ffa4bb711c48684163a488f52d73ebe Mon Sep 17 00:00:00 2001 From: 89wc <89wc@noreply.fsdfsd.net> Date: Tue, 5 Sep 2023 19:13:28 +0000 Subject: [PATCH] Update run --- run | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/run b/run index c41c14d..17c6358 100644 --- a/run +++ b/run @@ -1,6 +1,6 @@ #!/bin/bash -finish=""; count=0; lim=15000; +count=0; lim=15000; while [ $count -lt $lim ]; do finishcount=0; @@ -12,18 +12,18 @@ while [ $count -lt $lim ]; do # The ./getlink checks for a 404. # This continues a few post id's down to make sure it's really reached the end. # The post id will not be incremented if there are five 404's in a row. - if [ "$url" = "error finish" ]; then echo -n " -finish- "; finishcount=$(( $finishcount + 1)); - if [ "$(./getlink $(( $pid+1 )) )" = "error finish" ]; then echo -n " - "; finishcount=$(( $finishcount + 1 )); - if [ "$(./getlink $(( $pid+2 )) )" = "error finish" ]; then echo -n " - "; finishcount=$(( $finishcount + 1 )); - if [ "$(./getlink $(( $pid+3 )) )" = "error finish" ]; then echo -n " - "; finishcount=$(( $finishcount + 1 )); - if [ "$(./getlink $(( $pid+4 )) )" = "error finish" ]; then echo -n " - "; finishcount=$(( $finishcount + 1 )); + if [ "$url" = "error finish" ]; then echo -n " it"; finishcount=$(( $finishcount + 1 )); + if [ "$(./getlink $(( $pid+1 )) )" = "error finish" ]; then echo -n "'"; finishcount=$(( $finishcount + 1 )); + if [ "$(./getlink $(( $pid+2 )) )" = "error finish" ]; then echo -n "s"; finishcount=$(( $finishcount + 1 )); + if [ "$(./getlink $(( $pid+3 )) )" = "error finish" ]; then echo -n "..."; finishcount=$(( $finishcount + 1 )); + if [ "$(./getlink $(( $pid+4 )) )" = "error finish" ]; then echo -n " so"; finishcount=$(( $finishcount + 1 )); fi; fi; fi; fi; echo -n " -it's over- "; fi if [ "$finishcount" -gt 0 ] && [ "$finishcount" -lt 5 ]; then echo " -we're back- "; url=$(./getlink); else echo; fi; # Pause execution if rate limit has been reached - if [ "$url" = "error rlimit" ]; then echo "rlimit.. sleeping 60 (1)"; sleep 60; url=$(./getlink); - if [ "$url" = "error rlimit" ]; then echo "rlimit.. sleeping 600 (2)"; sleep 600; url=$(./getlink); + if [ "$url" = "error rlimit" ]; then echo "rlimit.. sleeping 60 (1)"; sleep 60; url=$(./getlink); + if [ "$url" = "error rlimit" ]; then echo "rlimit.. sleeping 600 (2)"; sleep 600; url=$(./getlink); if [ "$url" = "error rlimit" ]; then echo "rlimit.. sleeping 1140 (3)"; sleep 1140; url=$(./getlink); if [ "$url" = "error rlimit" ]; then echo "rlimit.. sleeping 1940 (4)"; sleep 1940; url=$(./getlink); fi; fi; fi; fi;