/usr/share/perl5/FlashVideo/Site/Googlevideosearch.pm is in get-flash-videos 1.25~git2014.03.23-2.
This file is owned by root:root, with mode 0o644.
The actual contents of the file can be viewed below.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 | # Part of get-flash-videos. See get_flash_videos for copyright.
package FlashVideo::Site::Googlevideosearch;
use strict;
no warnings 'uninitialized';
use FlashVideo::Mechanize;
use URI::Escape;
sub search {
my($self, $search, $type) = @_;
my $browser = FlashVideo::Mechanize->new;
$browser->allow_redirects;
$browser->get('http://www.google.com/videohp');
$browser->submit_form(
with_fields => {
q => $search,
}
);
return unless $browser->success;
my @links = map {
chomp(my $name = $_->text);
my $url = $_->url_abs->as_string;
$url =~ /q=([^&]*)/;
$url = uri_unescape($1);
{ name => $name, url => $url }
}
$browser->find_all_links(text_regex => qr/.+/, url_regex => qr/\/url/);
return @links;
}
1;
|