Over a million developers have joined DZone.

ImgShack Scraper

DZone's Guide to

ImgShack Scraper

Free Resource
// Scrapes the given imgshack server for uploaded images.  Change the img219 to a different number for different results.

#!/usr/bin/perl -w
#use strict;
use WWW::Mechanize;
use WWW::Mechanize::Link;

#Create an Object
my $mech = WWW::Mechanize->new();
my $a;
print "hello";
$a = 1;
while ($a <= 999) {
print "$a";
#Url to search images on.
my $url = "http://img219.imageshack.us/my.php?image=$a.jpg";
print "$url";
#Request webpage
$mech->get( $url );
#Find image
my @imglinks = $mech->find_image( alt_regex => qr/^img/i);
foreach my $currentimg (@imglinks) {
        #Get image
        $mech->get( $currentimg->url_abs, ":content_file" => "$a.jpg");
print "\n";

Opinions expressed by DZone contributors are their own.

{{ parent.title || parent.header.title}}

{{ parent.tldr }}

{{ parent.urlSource.name }}