Skip to content

Commit

Permalink
Fix Muzu support - fixes issue 67.
Browse files Browse the repository at this point in the history
  • Loading branch information
zakflash committed Feb 23, 2010
1 parent 1e889eb commit f83ce98
Showing 1 changed file with 15 additions and 2 deletions.
17 changes: 15 additions & 2 deletions FlashVideo/Site/Muzu.pm
Expand Up @@ -8,15 +8,28 @@ use HTML::Entities;
sub find_video {
my ($self, $browser) = @_;

# Sometimes redirects to country-specific sites, sigh...
if ($browser->response->code == 302) {
$browser->get($browser->response->header('Location'))
}

$browser->content =~ /id="trackHeading">(.*?)</;
my $filename = title_to_filename(decode_entities($1));
my $title = $1;

if (!$title) {
$browser->content =~ /id="videosPageMainTitleH1">(.*?)</s;
$title = $1;
}

my $filename = title_to_filename(decode_entities($title));

my $flashvars = ($browser->content =~ m'flashvars:"([^"]+)')[0];
my $flashvars = ($browser->content =~ m'flashvars:(?:\s+getPlayerData\(\)\s+\+\s+)?"([^"]+)')[0];
die "Unable to extract flashvars" unless $flashvars;

my %map = (
networkId => "id",
assetId => "assetId",
vidId => "assetId",
startChannel => "playlistId",
);

Expand Down

0 comments on commit f83ce98

Please sign in to comment.