[DRBonanza] Add new extractor (fixing #4581)
[youtube-dl] / youtube_dl / extractor / npo.py
index 8da76ae45aa3ec012f51d0a3d832f56bd0efe77f..fcd4fea94a570cdb607a8027da7628d911ed828b 100644 (file)
@@ -10,6 +10,7 @@ from ..utils import (
     strip_jsonp,
     url_basename,
     fix_xml_ampersands,
+    determine_ext,
 )
 
 
@@ -67,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):
@@ -125,6 +136,12 @@ class NPOIE(InfoExtractor):
                 stream_url = stream.get('url')
                 if not stream_url:
                     continue
+                if not '.asf' in stream_url:
+                    formats.append({
+                        'url': stream_url,
+                        'quality': stream.get('kwaliteit'),
+                    })
+                    continue
                 asx = self._download_xml(
                     stream_url, video_id,
                     'Downloading stream %d ASX playlist' % i,