use strict; use warnings; use LWP::UserAgent; use CGI qw(:standard :cgi-lib -debug fatalsToBrowser warningsToBrowser); use HTML::TokeParser; my $cgi = new CGI; print $cgi->header(); print start_html(-title =>'Save QC'); print "Starting...",br; my $ua = LWP::UserAgent->new; $ua->timeout(10); $ua->env_proxy; $ua->agent('Mozilla/5.0 Windows Gecko/30.0 Firefox/30.0'); my $response = $ua->get('http://questionablecontent.net/'); if ($response->is_success) { # print $response->decoded_content; # or whatever print br,br,"Success!"; my $tp = HTML::TokeParser->new(\$response->content) || die "Can't open: $!"; while (my $token = $tp->get_tag('img')) { my $src = $token->[1]{'src'}; print "src =",$src,br } } else { print $response->decoded_content; # or whatever print br,br,"Failure!"; die $response->status_line; } print end_html; #### (offline mode: enter name=value pairs on standard input; press ^D or ^Z when done) Content-Type: text/html; charset=ISO-8859-1 (offline mode: enter name=value pairs on standard input; press ^D or ^Z when done) Save QC Starting...


Success!src =http://www.projectwonderful.com/nojs.php?id=39770&type=5
src =http://www.questionablecontent.net/images/patreonad.png
src =../images/logo14.png
src =http://www.questionablecontent.net/comics/2845.png
src =http://www.questionablecontent.net/images/1s1k.gif
src =http://www.questionablecontent.net/images/station.gif
src =http://www.questionablecontent.net/images/qc-vol04.jpg
src =http://www.questionablecontent.net/images/yelingboard.jpg
src =http://www.questionablecontent.net/images/18x24.jpg
src =http://www.questionablecontent.net/images/mlgshirt.jpg
src =../images/ag.gif
src =http://api.flattr.com/button/flattr-badge-large.png
src =http://www.questionablecontent.net/images/patreonad2.png
src =http://www.projectwonderful.com/nojs.php?id=138&type=2