use videosite::GrabberBase;
@ISA = qw(videosite::GrabberBase);
-use LWP::Simple qw(!get);
-use LWP::UserAgent;
use URI;
use URI::QueryParam;
use HTML::Parser;
my @text;
my $e;
my $xml = undef;
- my $ua;
+ my $ua = $self->ua();
$url =~ m|$pattern|;
$url = $1;
if ($pattern eq $self->{'PATTERNS'}->[0]) {
# blip.tv/file pattern
- unless(defined($content = LWP::Simple::get(sprintf('http://blip.tv/file/%s', $2)))) {
+ unless(defined($content = $self->simple_get(sprintf('http://blip.tv/file/%s', $2), $ua))) {
$self->error('Could not download page');
return undef;
}
my $r;
my $u;
- $ua = LWP::UserAgent->new(max_redirect => 0);
+ $ua->max_redirect(0);
$r = $ua->get(sprintf('http://blip.tv/play/%s', $2));
unless(defined($r)) {
}
# Download the XML file containing the stream information
- unless(defined($content = LWP::Simple::get(sprintf('http://blip.tv/rss/flash/%s', $xml)))) {
+ $ua->max_redirect(7);
+ unless(defined($content = $self->simple_get(sprintf('http://blip.tv/rss/flash/%s', $xml), $ua))) {
$self->error('Could not download XML metadata');
return undef;
}