]> jfr.im git - yt-dlp.git/blobdiff - youtube_dl/extractor/vidme.py
[ccc] Improve extraction (closes #14601, closes #20355)
[yt-dlp.git] / youtube_dl / extractor / vidme.py
index 59adb2377e06c95bb8681432a0411723b7879945..174e69cd6b1e8ce1e5bf829781140ea756bdc6bf 100644 (file)
@@ -3,15 +3,13 @@
 import itertools
 
 from .common import InfoExtractor
-from ..compat import (
-    compat_HTTPError,
-    compat_str,
-)
+from ..compat import compat_HTTPError
 from ..utils import (
     ExtractorError,
     int_or_none,
     float_or_none,
     parse_iso8601,
+    url_or_none,
 )
 
 
@@ -166,8 +164,8 @@ def _real_extract(self, url):
 
         formats = []
         for f in video.get('formats', []):
-            format_url = f.get('uri')
-            if not format_url or not isinstance(format_url, compat_str):
+            format_url = url_or_none(f.get('uri'))
+            if not format_url:
                 continue
             format_type = f.get('type')
             if format_type == 'dash':