summaryrefslogtreecommitdiffstats
path: root/dropbox_gallery_dl.pl
blob: 8b22af8c62449401359a25451c2ca07f3edc9b7d (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
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);
}