{$comic}{'fullName'}) ******* -->
@@ -265,11 +279,22 @@ sub writeComic ($$) {
$comics->{$comic}{'fullName'}
-
+
$comics->{$comic}{'url'}
+EOF
+ if ( $comics->{$comic}{'mode'} == 3 ) {
+ print("Mode 3\n");
+ $content .= <
+EOF
+ } else {
+ $content .= <
+EOF
+ }
+ $content .= <
|
@@ -395,6 +420,13 @@ sub directDownload ($$) {
#######################################################################
#######################################################################
+sub linkOnly ($$) {
+ my ( $comics, $comic, $date ) = @_;
+
+ return 0;
+}
+#######################################################################
+#######################################################################
sub indexDownload ($$) {
my ( $comics, $comic, $date ) = @_;
my ( @lines, $comicLine, $mainURL );
@@ -437,9 +469,13 @@ sub indexDownload ($$) {
## Find the comic strip URL based on the specified regex in the search
##
+ print "Using search $comics->{$comic}{'search'}\n";
+
foreach my $line (@lines) {
if ( $line =~ m/$comics->{$comic}{'search'}/i ) {
+ print "Found match:\n";
$comicLine = $1; chomp $comicLine;
+ print "+ $comicLine\n";
}
}
@@ -450,8 +486,10 @@ sub indexDownload ($$) {
my $cDate = $date->{'day2'};
if ( $comicLine ) {
+ print "Downloading Comic\n";
if ( $comicLine =~ m/(gif|jpg|png)/i ) { $comics->{$comic}{'ext'} = $1; }
my $comicURL = ( $comicLine =~ m/http/ ) ? $comicLine : $mainURL . $comicLine;
+ print "Final URL: $comicURL\n";
# Strip &
$comicURL =~ s/\&\;/&/g;
my $cmd = "wget --no-check-certificate --user-agent=\"$USER_AGENT\" --referer='" . $comics->{$comic}{'url'} . "' -q '$comicURL' -O images/$cDir/$comic-$cDate.$comics->{$comic}{'ext'}";