What you describe is potentially do-able, but you're missng one important piece of information - just how do you know these images exist if you don't have the URLs?
Are you just guessing that the numbers are sequential and that images 6, 7, and 8 exist just because images 1 through 5 do? What about if the numbers are not consecutive? How far do you look ahead? What if they don't follow the pattern at all?
In short, you need to more clearly define the rules of how you determine which URLs to (try to) retrieve. Only then can you formulate any kind of script to automate the process.