Created
January 22, 2015 07:24
-
-
Save mix3/90d1579ff71f2489fb7c to your computer and use it in GitHub Desktop.
http://zoi.herokuapp.com/ から画像urlのリストを取ってくる
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
use 5.018; | |
use strict; | |
use warnings; | |
use utf8; | |
use Furl; | |
sub zoi_urls { | |
state $urls = do { | |
my $furl = Furl->new; | |
my @urls = (); | |
my $res = $furl->get("http://zoi.herokuapp.com/js/services.js"); | |
for my $line ( split "\n", $res->content ) { | |
if ( $line =~ /image:\s+'(.+?):large'/ ) { | |
push @urls, $1; | |
} | |
} | |
\@urls; | |
}; | |
} | |
for my $url ( @{ zoi_urls() } ) { | |
print $url, "\n"; | |
} |
Author
mix3
commented
Jan 22, 2015
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment