- unless(defined($content = LWP::Simple::get(sprintf('http://www.veoh.com/rest/v2/execute.xml?apiKey=5697781E-1C60-663B-FFD8-9B49D2B56D36&method=veoh.search.search&type=video&maxResults=1&permalink=%s&contentRatingId=1&', $2)))) {
+ unless(defined($content = $self->simple_get(sprintf('http://www.veoh.com/rest/v2/execute.xml?apiKey=5697781E-1C60-663B-FFD8-9B49D2B56D36&method=veoh.search.search&type=video&maxResults=1&permalink=%s&contentRatingId=1&', $2), $ua))) {
# We now have to fetch the dlurl to get the redirect target after it,
# because the dlurl itself must be called with the right referer set
# We now have to fetch the dlurl to get the redirect target after it,
# because the dlurl itself must be called with the right referer set
$r = $ua->get($dlurl, 'referer' => 'http://www.veoh.com');
unless ($r->is_redirect) {
$r = $ua->get($dlurl, 'referer' => 'http://www.veoh.com');
unless ($r->is_redirect) {