]> jfr.im git - yt-dlp.git/blobdiff - yt_dlp/extractor/sport5.py
[ie/youtube] Suppress "Unavailable videos are hidden" warning (#10159)
[yt-dlp.git] / yt_dlp / extractor / sport5.py
index 35c57d62a71ba763f2fee1915e2a405a0a77556a..6c45c3ec4ac658983d7a53790041f86b3cba884b 100644 (file)
@@ -1,7 +1,3 @@
-# coding: utf-8
-from __future__ import unicode_literals
-
-
 from .common import InfoExtractor
 from ..utils import ExtractorError
 
@@ -31,7 +27,7 @@ class Sport5IE(InfoExtractor):
                 'categories': list,
             },
             'skip': 'Blocked outside of Israel',
-        }
+        },
     ]
 
     def _real_extract(self, url):
@@ -43,13 +39,13 @@ def _real_extract(self, url):
         video_id = self._html_search_regex(r'clipId=([\w-]+)', webpage, 'video id')
 
         metadata = self._download_xml(
-            'http://sport5-metadata-rr-d.nsacdn.com/vod/vod/%s/HDS/metadata.xml' % video_id,
+            f'http://sport5-metadata-rr-d.nsacdn.com/vod/vod/{video_id}/HDS/metadata.xml',
             video_id)
 
         error = metadata.find('./Error')
         if error is not None:
             raise ExtractorError(
-                '%s returned error: %s - %s' % (
+                '{} returned error: {} - {}'.format(
                     self.IE_NAME,
                     error.find('./Name').text,
                     error.find('./Description').text),
@@ -78,7 +74,6 @@ def _real_extract(self, url):
             'width': int(fmt.get('width')),
             'height': int(fmt.get('height')),
         } for fmt in metadata.findall('./PlaybackLinks/FileURL')]
-        self._sort_formats(formats)
 
         return {
             'id': video_id,