diff options
author | James Bottomley <James.Bottomley@hansenpartnership.com> | 2013-06-16 12:12:52 -0700 |
---|---|---|
committer | James Bottomley <JBottomley@Parallels.com> | 2013-06-16 13:49:27 -0700 |
commit | 30658442936f4bee79ad1926fc0adf3611e3cd41 (patch) | |
tree | ef589052c9287980e483e2d331c6815e428594ca | |
parent | aa603a460f9cb26d5c6cd784b0fecd1ec57060e5 (diff) | |
download | get-flash-videos-30658442936f4bee79ad1926fc0adf3611e3cd41.tar.gz |
Itv.pm: new swfUrl causes downloads to stop working
On the week of 14 June 2013, the ITV player URL changed to
https://www.itv.com/mediaplayer/releases/13.6.1.3/ITVMediaPlayer.swf?v=13.6.1.3
From the old mercury one, causing rtmpdump swfUrl hash validation to fail and
downloads to stop working. Fix by refactoring the Itv.pm module to make
updating the swfUrl in a single place work much better and change the URL to
be the new one.
Signed-off-by: James Bottomley <James.Bottomley@hansenpartnership.com>
-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) }; } |