The backup needed some work. I changed it to a function so as it returns the urls that the algorithm considers acceptable.