diff --git a/boorubot_v2.sh b/boorubot_v2.sh index 42e6483..b6bb208 100755 --- a/boorubot_v2.sh +++ b/boorubot_v2.sh @@ -69,11 +69,11 @@ LENGTH="$(echo "$RESULT" | jq -r '. | .post | length')" SELECTION=`seq 0 $LENGTH` for i in $SELECTION;do - MD5="$(echo "$RESULT" | jq -r '. | .post['"$SELECTION"'].md5')" + MD5="$(echo "$RESULT" | jq -r '. | .post['"$i"'].md5')" [ -z "$MD5" ] && continue grep -q "$MD5" "$TMP" && continue - URL_FILE="$(echo "$RESULT" | jq -r '. | .post['"$SELECTION"'].file_url')" - RATING="$(echo "$RESULT" | jq -r '. | .post['"$SELECTION"'].rating')" + URL_FILE="$(echo "$RESULT" | jq -r '. | .post['"$i"'].file_url')" + RATING="$(echo "$RESULT" | jq -r '. | .post['"$i"'].rating')" NSFW="--nsfw" TEXT="$MSG_NSFW"