my $copyright = "WebCollage $version, Copyright (c) 1999-2015" .
" Jamie Zawinski <jwz\@jwz.org>\n" .
" http://www.jwz.org/webcollage/\n";
my $copyright = "WebCollage $version, Copyright (c) 1999-2015" .
" Jamie Zawinski <jwz\@jwz.org>\n" .
" http://www.jwz.org/webcollage/\n";
my $body = ($res && $res->is_success ? $res->decoded_content : '') || '';
LOG ($verbose_net, "get_document_1 $url " . ($referer ? $referer : ""));
my $body = ($res && $res->is_success ? $res->decoded_content : '') || '';
LOG ($verbose_net, "get_document_1 $url " . ($referer ? $referer : ""));
my $json = html_unquote($1);
my ($href) = ($json =~ m/\bsurl:"(.*?)"/s);
my ($img) = ($json =~ m/\bimgurl:"(.*?)"/s);
my $json = html_unquote($1);
my ($href) = ($json =~ m/\bsurl:"(.*?)"/s);
my ($img) = ($json =~ m/\bimgurl:"(.*?)"/s);
# Parsing JSON is a pain in the ass. So we halfass it as usual.
$body =~ s/^\[|\]$//s;
$body =~ s/(\[.*?\])/{ $_ = $1; s@\},@\} @gs; $_; }/gsexi;
# Parsing JSON is a pain in the ass. So we halfass it as usual.
$body =~ s/^\[|\]$//s;
$body =~ s/(\[.*?\])/{ $_ = $1; s@\},@\} @gs; $_; }/gsexi;
($img) = m/"url":\s*"(.*?)"/s unless $url;
next unless ($url && $img);
push @urls, [ $url, $img ];
($img) = m/"url":\s*"(.*?)"/s unless $url;
next unless ($url && $img);
push @urls, [ $url, $img ];