diff options
Diffstat (limited to 'dropbox_gallery_dl.pl')
-rwxr-xr-x | dropbox_gallery_dl.pl | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/dropbox_gallery_dl.pl b/dropbox_gallery_dl.pl new file mode 100755 index 0000000..8b22af8 --- /dev/null +++ b/dropbox_gallery_dl.pl @@ -0,0 +1,20 @@ +#!/usr/bin/perl +use warnings; +use strict; +use Data::Dumper; +use WWW::Mechanize; +use LWP::Simple; + +my $url = $ARGV[0]; + +my $mech = WWW::Mechanize->new(); + +$mech->get($url); + +my $content = $mech->content(); +while ($content =~ m/^\s*'filename': '(.*)',$/mg) { + my $img_name = $1; + $content =~ m/^\s*'original': "(.*)"$/mg; + my $img_url = $1; + getstore($img_url, $img_name); +} |