]> Raphaƫl G. Git Repositories - youtubedl/blobdiff - youtube_dl/extractor/cammodels.py
New upstream version 2018.11.07
[youtubedl] / youtube_dl / extractor / cammodels.py
index ee0165dbaa20c3b3d4ecca53fbb748cb3f823bf8..79350817f5599fba1b560215076aea2878984835 100644 (file)
@@ -2,10 +2,10 @@
 from __future__ import unicode_literals
 
 from .common import InfoExtractor
 from __future__ import unicode_literals
 
 from .common import InfoExtractor
-from ..compat import compat_str
 from ..utils import (
     ExtractorError,
     int_or_none,
 from ..utils import (
     ExtractorError,
     int_or_none,
+    url_or_none,
 )
 
 
 )
 
 
@@ -56,8 +56,8 @@ class CamModelsIE(InfoExtractor):
             for media in encodings:
                 if not isinstance(media, dict):
                     continue
             for media in encodings:
                 if not isinstance(media, dict):
                     continue
-                media_url = media.get('location')
-                if not media_url or not isinstance(media_url, compat_str):
+                media_url = url_or_none(media.get('location'))
+                if not media_url:
                     continue
 
                 format_id_list = [format_id]
                     continue
 
                 format_id_list = [format_id]