Skip to content

Instantly share code, notes, and snippets.

@icheernoom
Last active August 28, 2017 04:13
Show Gist options
  • Save icheernoom/8415974 to your computer and use it in GitHub Desktop.
Save icheernoom/8415974 to your computer and use it in GitHub Desktop.
Save all slide in slideshare.net to image.
use LWP::UserAgent;
if(@ARGV < 2){
print "Usage : filename.pl <slideshare_url> <folder_name>";
exit;
}
$url = $ARGV[0];
$folder = $ARGV[1];
$browser = LWP::UserAgent->new() or die;
$content = $browser->get($url)->content;
$i = 1;
while($content =~ m/data-normal=\"(.*?)\"/g){
$pic = $1;
$img = $browser->get($pic)->content;
open OUTFILE, ">> ".$folder.'/'.$i.'.jpg';
binmode OUTFILE;
print OUTFILE $img;
close OUTFILE;
print $pic." => Saved \n";
$i++;
}
@thanik
Copy link

thanik commented Jan 14, 2014

MEPKING

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment