Webスクレイピングとは? 例えば、昇天するくらいかわいい猫画像ください : あじゃじゃしたーの猫の画像が欲しいときにどうすればいいでしょうか*1。画像を1つずつ手作業で保存?面倒くさいですね。 そんなときのためのWebスクレイピングです。まずはじめは、Web::Scraperというモジュールを使ってみましょう。 use strict; use warnings; use autodie; use File::Basename; use File::Spec; use LWP::UserAgent; use URI; use Web::Scraper; my $url = 'http://blog.livedoor.jp/chihhylove/archives/3573873.html'; my $scraper = scraper { process '.main img.pict, .
![Webスクレイピング入門 - Articles Advent Calendar 2011 Casual](https://cdn-ak-scissors.b.st-hatena.com/image/square/a87408f900b9b49b6053d7f58ae047cfd039bb0d/height=288;version=1;width=512/https%3A%2F%2Fres.cloudinary.com%2Fkfly8%2Fimage%2Fupload%2Fl_text%3ANotoSansJP-Black.otf_50_bold%3AWeb%25E3%2582%25B9%25E3%2582%25AF%25E3%2583%25AC%25E3%2582%25A4%25E3%2583%2594%25E3%2583%25B3%25E3%2582%25B0%25E5%2585%25A5%25E9%2596%2580%2Cco_rgb%3A000000%2Cw_900%2Cc_fit%2Fl_text%3ANotoSansJP-Black.otf_30_bold%3Aakiym%2Cco_rgb%3A000000%2Cg_south_east%2Cx_130%2Cy_120%2Fv1601626948%2Fog-perl-users-jp.png)