浏览代码

[npo] Fix non asf streams (Closes #4680)

Sergey M․ 10 年之前
父节点
当前提交
a0977064ce
共有 1 个文件被更改,包括 7 次插入0 次删除
  1. 7 0
      youtube_dl/extractor/npo.py

+ 7 - 0
youtube_dl/extractor/npo.py

@@ -10,6 +10,7 @@ from ..utils import (
     strip_jsonp,
     url_basename,
     fix_xml_ampersands,
+    determine_ext,
 )
 
 
@@ -125,6 +126,12 @@ class NPOIE(InfoExtractor):
                 stream_url = stream.get('url')
                 if not stream_url:
                     continue
+                if determine_ext(stream_url).lower() != 'asf':
+                    formats.append({
+                        'url': stream_url,
+                        'quality': stream.get('kwaliteit'),
+                    })
+                    continue
                 asx = self._download_xml(
                     stream_url, video_id,
                     'Downloading stream %d ASX playlist' % i,