It just doesn't size some of the images.
The output below is generally what I get. It will put the size down for a few of them but only rarely.my $pics_found = $#found_images + 1; while (@found_galleries && @found_images <= $pics_to_find * 20) { # Remove one gallery link at a time until we're done. my $gal_url = pop(@found_galleries); my $gal = get($gal_url); print "gal = $gal_url<br>"; # Extract the image URLs from the gallery page. my @image_urls = $gal =~ m#(http://images\.imagefap\.com/images/thu +mb/\d+/\d+/\d+\.jpg)#g; foreach my $img (@image_urls) { $img =~ s/thumb/full/ig; } # Remove the images which are too big. if ($limit_img_size eq "yes") { @image_urls = grep { my $this_url = $_; my $image = get($this_url); my ($height, $width) = imgsize(\$image); print "IMG $this_url is $height and $width<br>"; $height <= $max_height && $width <= $max_width } @image_urls; } push @found_images, @image_urls; }
I don't suppose you or anyone else can see what's going wrong?gal = http://www.imagefap.com/gallery.php?gid=158098 IMG http://images.imagefap.com/images/full/5/190/190037365.jpg is and IMG http://images.imagefap.com/images/full/6/804/804735625.jpg is and IMG http://images.imagefap.com/images/full/7/478/478782005.jpg is and IMG http://images.imagefap.com/images/full/10/199/1994599748.jpg is an +d IMG http://images.imagefap.com/images/full/4/115/1151974238.jpg is and
In reply to Re^2: endless loop problems
by Anonymous Monk
in thread endless loop problems
by Anonymous Monk
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |