]> Raphaƫl G. Git Repositories - youtubedl/blobdiff - youtube_dl/extractor/redtube.py
Merge changes from buster branch for the NMU while I was away.
[youtubedl] / youtube_dl / extractor / redtube.py
index 879bcf81d8136ff4bb1f90a9312ff5c7812fdfb8..10311a81a8ae26e283d381fba88c44752844d04f 100644 (file)
@@ -3,12 +3,12 @@ from __future__ import unicode_literals
 import re
 
 from .common import InfoExtractor
-from ..compat import compat_str
 from ..utils import (
     ExtractorError,
     int_or_none,
     str_to_int,
     unified_strdate,
+    url_or_none,
 )
 
 
@@ -71,8 +71,8 @@ class RedTubeIE(InfoExtractor):
             video_id, fatal=False)
         if medias and isinstance(medias, list):
             for media in medias:
-                format_url = media.get('videoUrl')
-                if not format_url or not isinstance(format_url, compat_str):
+                format_url = url_or_none(media.get('videoUrl'))
+                if not format_url:
                     continue
                 format_id = media.get('quality')
                 formats.append({