Hi! I'd be very appreciative if someone could help me with this...
I'm using the proHTML library for the first time, to collect images from random myspace profile pages. This is really all the relevant code:
Code:
htmlImageFinder = new HtmlImageFinder(url);
imagesonpage = htmlImageFinder.getNumbOfImages();
if (imagesonpage > 1)
{
profileimage = loadImage(htmlImageFinder.getImageLink(1));
pics[counter] = profileimage;
}
else
{
pics[counter] = blank;
}
I define the "url" separately in another part of the code as "http://www.myspace.com/" + a randomly generated number. And usually, this code works just fine. But sometimes it hiccups with an error like the following:
Code:The file "http://myspace-250.vo.llnwd.net/00000/05/22/32250_m.jpg" is missing or inaccessible, make sure the URL is valid or that the file has been added to your sketch and is readable.
Now from what I gather, that basically means that proHTML knows there's an image on the page, but when it tries to load the image, it finds out the image URL is for some reason broken, and then it shuts down.
My question is, is there any way to check for this problem and resolve it by diverting the program to a new URL? Any help would be greatly appreciated!
-Katherine