Update run.sh

master
89wc 2023-09-04 20:23:00 +00:00
parent b19b3e908e
commit 488aef4d16
1 changed files with 10 additions and 7 deletions

View File

@ -9,13 +9,6 @@ while [ $count -lt $lim ]; do
url=$(./getlink);
# 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 1140 (3)"; sleep 1140; url=$(./getlink);
if [ "$url" = "error rlimit" ]; then echo "rlimit.. sleeping 2940 (4)"; sleep 2940; url=$(./getlink);
fi; fi; fi; fi;
# 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.
@ -26,6 +19,16 @@ while [ $count -lt $lim ]; do
if [ "$(./getlink $(( $pid+4 )) )" = "error finish" ]; then echo -n " -finish- "; finishcount=$(( $finishcount + 1 ));
fi; fi; fi; fi; echo " -ok- ";
fi
if [ "$finishcount" -gt 0 ] && [ "$finishcount" -lt 5 ]; then url=$(./getlink); 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 1140 (3)"; sleep 1140; url=$(./getlink);
if [ "$url" = "error rlimit" ]; then echo "rlimit.. sleeping 2940 (4)"; sleep 2940; url=$(./getlink);
fi; fi; fi; fi;
echo "$url";