]> jfr.im git - yt-dlp.git/blobdiff - yt_dlp/extractor/sapo.py
[ie/matchtv] Fix extractor (#10190)
[yt-dlp.git] / yt_dlp / extractor / sapo.py
index 49a9b313a87a5bf9b80fa8a3b8d78c104722cd5b..2b8c078ea02c239921d3c58de5de8abebed4e0f2 100644 (file)
@@ -1,6 +1,3 @@
-# coding: utf-8
-from __future__ import unicode_literals
-
 import re
 
 from .common import InfoExtractor
@@ -63,11 +60,11 @@ class SapoIE(InfoExtractor):
     ]
 
     def _real_extract(self, url):
-        mobj = re.match(self._VALID_URL, url)
+        mobj = self._match_valid_url(url)
         video_id = mobj.group('id')
 
         item = self._download_xml(
-            'http://rd3.videos.sapo.pt/%s/rss2' % video_id, video_id).find('./channel/item')
+            f'http://rd3.videos.sapo.pt/{video_id}/rss2', video_id).find('./channel/item')
 
         title = item.find('./title').text
         description = item.find('./{http://videos.sapo.pt/mrss/}synopse').text
@@ -101,8 +98,6 @@ def _real_extract(self, url):
                 'height': 720,
             })
 
-        self._sort_formats(formats)
-
         return {
             'id': video_id,
             'title': title,