diff options
-rw-r--r-- | lib/FlashVideo/Site/Itv.pm | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/lib/FlashVideo/Site/Itv.pm b/lib/FlashVideo/Site/Itv.pm index 525ec4b..3cb4657 100644 --- a/lib/FlashVideo/Site/Itv.pm +++ b/lib/FlashVideo/Site/Itv.pm @@ -8,6 +8,10 @@ use Encode; our $VERSION = '0.03'; sub Version() { $VERSION;} +## +# global place for the swfurl +## +my $swfurl = 'https://www.itv.com/mediaplayer/releases/13.6.1.3/ITVMediaPlayer.swf?v=13.6.1.3'; sub find_video { my ($self, $browser, $page_url, $prefs) = @_; @@ -19,7 +23,7 @@ sub find_video { $browser->post("http://mercury.itv.com/PlaylistService.svc", Content_Type => "text/xml; charset=utf-8", - Referer => "http://www.itv.com/mercury/Mercury_VideoPlayer.swf?v=1.5.309/[[DYNAMIC]]/2", + Referer => "$swfurl/[[DYNAMIC]]/2", SOAPAction => '"http://tempuri.org/PlaylistService/GetPlaylist"', Content => <<EOF); <SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"> @@ -57,7 +61,7 @@ EOF die "No id (filter) found in URL or production id\n" unless $productionid; $browser->post("http://mercury.itv.com/PlaylistService.svc", Content_Type => "text/xml; charset=utf-8", - Referer => "http://www.itv.com/mercury/Mercury_VideoPlayer.swf?v=1.5.309/[[DYNAMIC]]/2", + Referer => "$swfurl/[[DYNAMIC]]/2", SOAPAction => '"http://tempuri.org/PlaylistService/GetPlaylist"', Content => <<EOF); <soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:tem="http://tempuri.org/" xmlns:itv="http://schemas.datacontract.org/2004/07/Itv.BB.Mercury.Common.Types" xmlns:com="http://schemas.itv.com/2009/05/Common"> @@ -200,7 +204,7 @@ EOF rtmp => $rtmp, playpath => $playpath, flv => $flv, - swfhash($browser, "http://www.itv.com/mercury/Mercury_VideoPlayer.swf") + swfhash($browser, $swfurl) }; } |