#!/usr/bin/perl
# Downloads Hack In The Box Magazines
use strict;
use warnings;
use LWP::Simple;
for (my $i=1;$i<1000;$i++){
my $url=sprintf("http://magazine.hitb.org/issues/HITB-Ezine-Issue-%03d.pdf",$i);
my $pdf=sprintf("HITB-Ezine-Issue-%03d.pdf",$i);
next if (-e $pdf);
my $status=getstore($url,$pdf);
if(is_error($status)){
print "[$status] Couldn't download: $url\n";
last;
}
else{
print "[$status] Downloaded: $url\n";
}
}
Saturday, July 2, 2016
Hack In The Box Magazine Perl Script To Download All Issues As PDF
I wrote this a long time ago to scrape the Hack in the Box site and download all their magazines in PDF format:
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment