use videosite::GrabberBase;
@ISA = qw(videosite::GrabberBase);
-use LWP::Simple qw(!get);
use XML::Simple;
use HTML::Parser;
use Data::Dumper;
my $p = XML::Simple->new();
my $t;
my @accum;
+ my $ua = $self->ua();
$url =~ m|$pattern|;
$url = $1;
$metadata->{'DLURL'} = undef;
# Get the XML file containing the video metadata
- unless(defined($content = LWP::Simple::get(sprintf('http://cosmos.bcst.yahoo.com/up/yep/process/getPlaylistFOP.php?node_id=%s', $2)))) {
+ unless(defined($content = $self->simple_get(sprintf('http://cosmos.bcst.yahoo.com/up/yep/process/getPlaylistFOP.php?node_id=%s', $2), $ua))) {
$self->error('Could not download XML metadata');
return undef;
}
# The XML does not contain the title of the video, for
# reasons possibly known to some jerk at yahoo.
# So we'll have to parse the actual HTML, too.
- unless(defined($content = LWP::Simple::get($url))) {
+ unless(defined($content = $self->simple_get($url, $ua))) {
$self->error('Could not download HTML');
return undef;
}