Merge pull request #4136 from andikmu/master
authorJaime Marquínez Ferrándiz <jaimeMF@users.noreply.github.com>
Sun, 9 Nov 2014 11:17:18 +0000 (12:17 +0100)
committerJaime Marquínez Ferrándiz <jaimeMF@users.noreply.github.com>
Sun, 9 Nov 2014 11:17:18 +0000 (12:17 +0100)
fix swrmediathek for new formats.

youtube_dl/YoutubeDL.py
youtube_dl/extractor/grooveshark.py
youtube_dl/extractor/ndr.py
youtube_dl/utils.py

index 8732f3db4e3a7c0eb91182954f0c3a7801dc681c..172180d1402444258f7a9501693e235872d85dac 100755 (executable)
@@ -835,6 +835,13 @@ class YoutubeDL(object):
                         format_1, format_2 = rf.split('+')
                         formats_info = (self.select_format(format_1, formats),
                             self.select_format(format_2, formats))
+                        # The first format must contain the video and the
+                        # second the audio
+                        if formats_info[0].get('vcodec') == 'none':
+                            self.report_error('The first format must contain '
+                                'the video, try using "-f %s+%s"' %
+                                (format_2, format_1))
+                            return
                         if all(formats_info):
                             selected_format = {
                                 'requested_formats': formats_info,
index 726adff773305844a5e8950b4467509646b79d1d..fff74a70a891fc163ff488408e4df348564b8a29 100644 (file)
@@ -8,12 +8,13 @@ import re
 
 
 from .common import InfoExtractor
-from ..utils import ExtractorError, compat_urllib_request, compat_html_parser
-
-from ..utils import (
+from ..compat import (
+    compat_html_parser,
     compat_urllib_parse,
+    compat_urllib_request,
     compat_urlparse,
 )
+from ..utils import ExtractorError
 
 
 class GroovesharkHtmlParser(compat_html_parser.HTMLParser):
index add4b3e5d3b1fcdd4580f8a6fddcd115556ae1cb..c31ff8160851f824042804a06d905f85d3217416 100644 (file)
@@ -67,7 +67,7 @@ class NDRIE(InfoExtractor):
 
         thumbnail = None
 
-        video_url = re.search(r'''3: \{src:'(?P<video>.+?)\.hi\.mp4', type:"video/mp4"},''', page)
+        video_url = re.search(r'''3: \{src:'(?P<video>.+?)\.(lo|hi|hq)\.mp4', type:"video/mp4"},''', page)
         if video_url:
             thumbnails = re.findall(r'''\d+: \{src: "([^"]+)"(?: \|\| '[^']+')?, quality: '([^']+)'}''', page)
             if thumbnails:
index 7c0fb1592914e961a6b1e790bf14fb5525eff08a..d87e212ae67958cc89e2db7002072fc332477469 100644 (file)
@@ -34,7 +34,6 @@ from .compat import (
     compat_chr,
     compat_getenv,
     compat_html_entities,
-    compat_html_parser,
     compat_parse_qs,
     compat_str,
     compat_urllib_error,