#!c:\perl\perl.exe -w use strict; use LWP::Simple; my @results; my @file; my $i = 0; my @sluggy = split("\n",get("http://www.sluggy.com")); for (@sluggy) { if(/"(http:\/\/pics\.sluggy\.com\/comics\/.*?)"/) { push @results, $1; $1 =~ /.*\.(...)/; push @file, "image_$i.$1"; $i++; } } my @userfriendly = split("\n",get("http://www.userfriendly.org")); for (@userfriendly) { if(/"(http:\/\/www\.userfriendly\.org\/cartoons\/archives\/[\d|\l] +.*?)"/) { push @results, $1; $1 =~ /.*\.(...)/; push @file, "image_$i.$1"; $i++; } } my @sinfest = split("\n",get("http://www.sinfest.net")); for (@sinfest) { if(/"(\/comics\/.*?)"/) { push @results, "http://www.sinfest.net$1"; $1 =~ /.*\.(...)/; push @file, "image_$i.$1"; $i++; } } get("http://www.nuklearpower.com/comic/") =~ /<a href="(.*?)">Newest Comic<\/a>/; my @nuklearpower = split("\n",get("http://www.nuklearpower.com/comic/$ +1")); for (@nuklearpower) { if( /<p align=".*?"><img border=".*?" src="(.*?)" width="720" height="936" +><\/p>/ ) { push @results, "http://www.nuklearpower.com/comic/$1"; $1 =~ /.*\.(...)/; push @file, "image_$i.$1"; $i++; } } my @megatokyo = split("\n",get("http://www.megatokyo.com")); for (@megatokyo) { if(/"(\/strips\/.*?)"/) { push @results, "http://www.megatokyo.com$1"; $1 =~ /.*\.(...)/; push @file, "image_$i.$1"; $i++; } } my @machall = split("\n",get("http://www.machall.com")); for (@machall) { if( /src='(\/index\.php\?do_command=show_strip.*?)'/ ) { push @results, "http://www.machall.com$1"; push @file, "image_$i.jpg"; $i++; } } open PAGE, ">comics.html" || die $!; print PAGE "<html>\n<main>\n<title>Matt's Comic Page</title>"; for(my $i = 0; $i < @results; $i++) { print "$results[$i]\n"; $results[$i] =~ /.*\.(...)/; getstore($results[$i], $file[$i]); print PAGE "<img src=\"$file[$i]\"><br>\n"; } print PAGE "</main>\n</html>"; close PAGE || die $!;
In reply to Online Comics by Boots111
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |