Name: kumo 2012-05-17 20:55
#!/usr/bin/perl
#2012-0517-2030
use WWW::Mechanize;
sub bash {my @args = ( "bash", "-c", shift); system(@args);}
my $url = $ARGV[0];
my $prefix = "(.*)//images.4chan.org/(.*)/src/(.*)";
my $mech = WWW::Mechanize->new();
$mech->get( $url );
my @links = $mech->links();
foreach my $link (@links) {
my $_ = $link->url();
if ($_ =~ (m/$prefix/)) {
s!//!http://!;
if ($_ ne $last_url) {bash("wget -nc $_");}
$last_url = $_;
} }
#2012-0517-2030
use WWW::Mechanize;
sub bash {my @args = ( "bash", "-c", shift); system(@args);}
my $url = $ARGV[0];
my $prefix = "(.*)//images.4chan.org/(.*)/src/(.*)";
my $mech = WWW::Mechanize->new();
$mech->get( $url );
my @links = $mech->links();
foreach my $link (@links) {
my $_ = $link->url();
if ($_ =~ (m/$prefix/)) {
s!//!http://!;
if ($_ ne $last_url) {bash("wget -nc $_");}
$last_url = $_;
} }