[npo] Make extension check less strict and add test (#4680)
authorSergey M․ <dstftw@gmail.com>
Sun, 11 Jan 2015 17:45:52 +0000 (23:45 +0600)
committerSergey M․ <dstftw@gmail.com>
Sun, 11 Jan 2015 17:45:52 +0000 (23:45 +0600)
youtube_dl/extractor/npo.py

index 47802518d93b99e3c2c2f3f43e0e6de4169a5b3c..fcd4fea94a570cdb607a8027da7628d911ed828b 100644 (file)
@@ -68,6 +68,16 @@ class NPOIE(InfoExtractor):
                 'skip_download': True,
             }
         },
+        # non asf in streams
+        {
+            'url': 'http://www.npo.nl/hoe-gaat-europa-verder-na-parijs/10-01-2015/WO_NOS_762771',
+            'md5': 'b3da13de374cbe2d5332a7e910bef97f',
+            'info_dict': {
+                'id': 'WO_NOS_762771',
+                'ext': 'mp4',
+                'title': 'Hoe gaat Europa verder na Parijs?',
+            },
+        },
     ]
 
     def _real_extract(self, url):
@@ -126,7 +136,7 @@ class NPOIE(InfoExtractor):
                 stream_url = stream.get('url')
                 if not stream_url:
                     continue
-                if determine_ext(stream_url).lower() != 'asf':
+                if not '.asf' in stream_url:
                     formats.append({
                         'url': stream_url,
                         'quality': stream.get('kwaliteit'),