Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #!/usr/bin/perl
- use strict;
- use warnings;
- use LWP::Simple;
- my $page = get($ARGV[0]) or die "unable to get page\n";
- my @images = ( $page =~ /http:\/\/images\.4chan\.org\/wg\/src\/\d+\.jpg/g );
- foreach (uniq(@images)){
- $_ =~ /(\d+\.jpg)/;
- unless (-e $1){
- system("wget $_");
- }
- }
- sub uniq {
- return keys %{{ map { $_ => 1 } @_ }};
- }
Add Comment
Please, Sign In to add comment