Guest User

Untitled

a guest
Feb 20th, 2018
93
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Perl 0.31 KB | None | 0 0
  1. #!/usr/bin/perl
  2. use strict;
  3. use warnings;
  4. use LWP::Simple;
  5.  
  6. my $page = get($ARGV[0]) or die "unable to get page\n";
  7. my @images = ( $page =~ /http:\/\/images\.4chan\.org\/wg\/src\/\d+\.jpg/g );
  8.  
  9.  
  10.  
  11. foreach (uniq(@images)){
  12.         system("wget $_");
  13. }
  14. sub uniq {
  15.     return keys %{{ map { $_ => 1 } @_ }};
  16. }
Add Comment
Please, Sign In to add comment