- if (200 != ($res = LWP::Simple::mirror($video->{'DLURL'}, $dlfile))) {
- $self->error('Could not download %s to %s (%s)', $video->{'DLURL'}, $dlfile, $res);
+ $res = $ua->mirror($video->{'DLURL'}, $dlfile);
+ if (!$res->is_success()) {
+ $self->error('Could not download %s to %s (%s)', $video->{'DLURL'}, $dlfile, $res->code());