+
+ |
+$today_long |
+ |
+
+
EOF
close (INDEX);
}
@@ -266,7 +289,7 @@ sub directDownload ($$) {
my $cDir = $date->{'mon2'} . $date->{'year2'};
my $cDate = $date->{'day2'};
- my $cmd = "wget -q $file --referer=\"" . $comics->{$comic}{'url'} ."\" --user-agent=\"$USER_AGENT\" -O - | /usr/bin/convert - jpeg:images/$cDir/$comic-$cDate.jpg";
+ my $cmd = "wget -q $file --referer=\"" . $comics->{$comic}{'url'} ."\" --user-agent=\"$USER_AGENT\" -O - | /usr/bin/convert - jpeg:images/$cDir/$comic-$cDate.jpg";
return system($cmd);
}
@@ -298,10 +321,10 @@ sub indexDownload ($$) {
## Find the comic strip URL based on the specified regex in the search
##
foreach my $line (@lines) {
- if ( $line =~ m/$comics->{$comic}{'search'}/ ) {
+ if ( $line =~ m/$comics->{$comic}{'search'}/i ) {
$comicLine = $1; chomp $comicLine;
}
- }
+ }
##
## Save the file to the appropriate directory
@@ -312,7 +335,7 @@ sub indexDownload ($$) {
if ( $comicLine ) {
if ( $comicLine =~ m/(gif|jpg|png)/i ) { $comics->{$comic}{'ext'} = $1; }
my $comicURL = ( $comicLine =~ m/http/ ) ? $comicLine : $mainURL . $comicLine;
- my $cmd = "wget --user-agent=\"$USER_AGENT\" --referer=\"" . $comics->{$comic}{'url'} . "\" -q $comicURL -O - | /usr/bin/convert - jpeg:images/$cDir/$comic-$cDate.jpg";
+ my $cmd = "wget --user-agent=\"$USER_AGENT\" --referer=\"" . $comics->{$comic}{'url'} . "\" -q $comicURL -O images/$cDir/$comic-$cDate.$comics->{$comic}{'ext'}";
system( $cmd );
return 0;
}
|