flocascio / get-flash-videos

Automatically exported from code.google.com/p/get-flash-videos
0 stars 0 forks source link

ITV.pm Unable to find video in XML #529

Open GoogleCodeExporter opened 8 years ago

GoogleCodeExporter commented 8 years ago
What steps will reproduce the problem?
1.get_flash_videos 
https://www.itv.com/itvplayer/law-and-order-uk/series-4/episode-3-paternal

What is the expected output? What do you see instead?

Using method 'itv' for 
https://www.itv.com/itvplayer/law-and-order-uk/series-4/episode-3-paternal
Downloading 
https://www.itv.com/itvplayer/law-and-order-uk/series-4/episode-3-paternal
Error: Unable to find video in XML at /loader/0xa6ff118/FlashVideo/Site/Itv.pm 
line 134.

Couldn't extract Flash movie URL. This site may need specific support adding,
or fixing.

Please confirm the site is using Flash video and if you have Flash available
check that the URL really works(!).

Check for updates by running: /usr/bin/get_flash_videos --update

If the latest version does not support this please open a bug (or
contribute a patch!) at http://code.google.com/p/get-flash-videos/
make sure you include the output with --debug enabled.
Couldn't download any videos.

What version of the product are you using? On what operating system?
$ get_flash_videos -v
get_flash_videos version  (http://code.google.com/p/get-flash-videos/)
Ubuntu 13.04

Please provide any additional information below.

Examining the --debug output, I see that the playpath is not in the expected 
form.  While the subsequent episode has 
mp4:production/priority/rtmpecatchup/1200/6B/1-8717-0030-002/1-8717-0030-002_law
---order--uk-(series-7)_tx040813_itv1200_16x9-reg.mp4
this one has
mp4:production/priority/rtmpearchive/1200/DD/1-8717-0029-002/1-8717-0029-002_itv
1200_law---order--uk-(series-7)_tx010101_16x9-reg.mp4
i.e. the "itv1200" appears earlier in the string, causing it to not match the 
"Normal format for catchup service" regex.

Adding an extra case
# alternative format
  while ($video =~ m/(mp4:[^\]]+_[A-Z]+([0-9]{3,4})_[^\]]+_(16|4)[-x](9|3)[^\]]*.mp4)/gi)
  {
    $formats{$2} = { video => $video, playpath => $1, ratio => "$3x$4" };
  }
before the alternative formats lines allowed me to download the episode 
successfully (which was fortunate, as it had less than a day to go before 
dropping off the site...)
I suspect it would be possible to construct a single regex that would work in 
either case, but it's the early hours of the morning and I'm too tired to 
figure it out right now :-)

Original issue reported on code.google.com by insomnia...@googlemail.com on 20 Aug 2013 at 3:18

GoogleCodeExporter commented 8 years ago
Your report was deleted by mistake - happens a lot because of some sort of 
scanning.
Same problem was reported in issue 515, fixed in version 0.04 of plugin. 

Done in single re...

-  while ($video =~ 
m/(mp4:[^\]]+_[A-Z]+([0-9]{3,4})_(16|4)[-x](9|3)[^\]]*.mp4)/gi)
+  while ($video =~ 
m/(mp4:[^\]]+_[A-Z]+([0-9]{3,4})(|_[^\]]+)_(16|4)[-x](9|3)[^\]]*.mp4)/gi)
   {
-    $formats{$2} = { video => $video, playpath => $1, ratio => "$3x$4" };
+    $formats{$2} = { video => $video, playpath => $1, ratio => "$4x$5" };
   }

Original comment by njtaylor...@gmail.com on 26 Aug 2013 at 10:21