/usr/share/perl5/FlashVideo/Site/Videobb.pm is in get-flash-videos 1.25~git2012.06.27-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 | # Part of get-flash-videos. See get_flash_videos for copyright.
package FlashVideo::Site::Videobb;
use strict;
use FlashVideo::Utils;
use FlashVideo::JSON;
use MIME::Base64;
sub find_video {
my ($self, $browser) = @_;
if($browser->status == 302) {
# in case we get a redirect
$browser->allow_redirects;
$browser->get;
}
my $flash_settings_b64 = ($browser->content =~ /<param value="setting=([^"]+)" name="FlashVars">/s)[0];
my $flash_settings = decode_base64($flash_settings_b64);
$browser->get($flash_settings);
if (!$browser->success) {
die "Couldn't download video settings: " . $browser->response->status_line;
}
my $settings_data = from_json($browser->content);
# assuming that the last in the list is the highest res
my $url = decode_base64($settings_data->{settings}{res}->[-1]->{u});
my $title = $settings_data->{settings}{video_details}{video}{title};
my $filename = title_to_filename($title);
return $url, $filename;
}
1;
|