CollegeHumor: Fix video URLs, and the title is in the XML now!
[videosite.git] / videosite / AsyncWgetFileGetter.pm
index ce68046..ef54e92 100644 (file)
@@ -54,8 +54,8 @@ sub get {
     my (undef, $tmpfile) = tempfile('videosite.tmp.XXXXXXXXXXXX', DIR => $dirname);
 
     $cookie = "--header=\"Cookie: $video->{'COOKIE'}\"" if (defined $video->{'COOKIE'});
-    my $cmdline = "( wget -q -O\"$tmpfile\" $cookie \"$video->{'DLURL'}\" && mv \"$tmpfile\" \"$dlfile\" && chmod =rw \"$dlfile\" || rm -f \"$tmpfile\" ) &";
-    $self->debug(encode_base64($cmdline));
+    my $cmdline = "( wget -q -O\"$tmpfile\" $cookie \"$video->{'DLURL'}\" && mv \"$tmpfile\" \"$dlfile\" && chmod =rw \"$dlfile\" && touch \"$dlfile\" || rm -f \"$tmpfile\" ) &";
+    $self->debug("Going to execute: %s", $cmdline);
     system($cmdline);
 
     return 1;