You could wrap your two critical commands in a loop:
max_retries=3 for i in $(seq $);do critical_command if [ $? == 0 ];then break fi done
$? stores the return code of the last command. "0" means success, anything else means failure. Within the square brackets, I compare this return code to "0". If they are equal, the comparison yields "true", which means we enter the "if" block (if you use this, pay attention to the whitespaces around the brackets, they are important). There I issue a single "break", which tells the for loop that it should terminate immediatly, and not do any further iterations. In short: if the critical_command was successfull, carry on with the rest of the program.
This also works if the output of your command is caught in a variable, like with your video_link. For the uploader tool, it might be advisable to add a little pause bevor retrying, since the server might be busy:
critical_command sleep 10 # wait for 10 seconds
I would wrap each command separately, even though its not the most elegant solution (you could create a wrapper function, which retries the command given as an argument - not sure though if this works in bash).