/usr/share/perl5/FlashVideo/Site/Starwars.pm is in get-flash-videos 1.25.98-1.
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 39 | # Part of get-flash-videos. See get_flash_videos for copyright.
package FlashVideo::Site::Starwars;
use strict;
use FlashVideo::Utils;
sub find_video {
my ($self, $browser, $embed_url) = @_;
my $video_id;
if ($browser->uri->as_string =~ /view\/([0-9]+)\.html$/) {
$video_id = $1;
}
my $page_url = $browser->uri->as_string;
$browser->get("http://starwars.com/webapps/video/item/$video_id");
my $xml = from_xml($browser);
my $items = $xml->{channel}->{item};
my $item = ref $items eq 'ARRAY' ?
(grep { $_->{link}->{content} eq "/video/view/" . $video_id . ".html" } @$items)[0] :
$items;
debug $item->{enclosure}->{url};
my $rtmpurl = $item->{enclosure}->{url};
$rtmpurl =~ s/^rtmp:/rtmpe:/; # for some reason it only works with rtmpe
my $title = $item->{title}; # is there a way to unencrypt <CDATA> tags? or does the xml handler do this for us?
return {
flv => $title,
rtmp => title_to_filename($rtmpurl),
playpath => $item->{content}->{url}
};
}
1;
|