Skip to content

Instantly share code, notes, and snippets.

@mix3 mix3/zoi_urls.pl
Created Jan 22, 2015

Embed
What would you like to do?
http://zoi.herokuapp.com/ から画像urlのリストを取ってくる
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";
}
@mix3

This comment has been minimized.

Copy link
Owner Author

mix3 commented Jan 22, 2015

$ carton exec perl ~/tmp/zoi_urls.pl
https://pbs.twimg.com/media/BspTawrCEAAwQnP.jpg
https://pbs.twimg.com/media/BspTkipCIAE4a0n.jpg
https://pbs.twimg.com/media/BspWSkvCAAAMi43.jpg
https://pbs.twimg.com/media/BspWVoqCEAADtZ4.jpg
https://pbs.twimg.com/media/BspWaPYCAAAI6Ui.jpg
https://pbs.twimg.com/media/BswuTdaCQAAQCkg.jpg
https://pbs.twimg.com/media/BspWc7LCAAAPzhS.jpg
https://pbs.twimg.com/media/BspWfqoCYAE836J.jpg
https://pbs.twimg.com/media/BtcSLNRCMAAFGoH.jpg
https://pbs.twimg.com/media/BtcSIHmCUAA8Prp.jpg
https://pbs.twimg.com/media/BswuLr2CMAA1SpE.jpg
https://pbs.twimg.com/media/BtcSRdRCMAArUCS.jpg
https://pbs.twimg.com/media/BspWlZFCMAA4fmV.jpg
https://pbs.twimg.com/media/BswuMrPCEAEECXg.jpg
https://pbs.twimg.com/media/BtcSOp6CcAA9_b4.jpg
https://pbs.twimg.com/media/BtcSFKpCQAAb73x.jpg
https://pbs.twimg.com/media/BspWoBQCcAAm9y5.jpg
https://pbs.twimg.com/media/BtcSM8BCYAE3_8j.jpg
https://pbs.twimg.com/media/BswuH1qCcAAueYw.jpg
https://pbs.twimg.com/media/BswuNkICcAE4olR.jpg
https://pbs.twimg.com/media/BswuJviCYAMCdGc.png
https://pbs.twimg.com/media/Bsw1StjCQAA9NQ1.jpg
https://pbs.twimg.com/media/BswuUTPCYAAVX5n.jpg
https://pbs.twimg.com/media/BtcSU0xCcAAmz_W.jpg
https://pbs.twimg.com/media/Bs7qd4uCAAAwalT.jpg
https://pbs.twimg.com/media/Bts7OpFCcAEkaO4.jpg
https://pbs.twimg.com/media/BtcSG05CMAEEyIG.jpg
https://pbs.twimg.com/media/BtcSDbWCQAADuhK.jpg
https://pbs.twimg.com/media/Bts7BNsCMAASKsP.jpg
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.