]> jfr.im git - yt-dlp.git/blobdiff - yt_dlp/extractor/pornovoisines.py
[ie/mlbtv] Fix extraction (#10296)
[yt-dlp.git] / yt_dlp / extractor / pornovoisines.py
index b6b71069d31070644afd46e2d92a939e4b33f744..587b3cdf79cd34a6eabeac6cc0daa4cf95a1da2f 100644 (file)
@@ -1,17 +1,13 @@
-# coding: utf-8
-from __future__ import unicode_literals
-
-import re
-
 from .common import InfoExtractor
 from ..utils import (
-    int_or_none,
     float_or_none,
+    int_or_none,
     unified_strdate,
 )
 
 
 class PornoVoisinesIE(InfoExtractor):
+    _WORKING = False
     _VALID_URL = r'https?://(?:www\.)?pornovoisines\.com/videos/show/(?P<id>\d+)/(?P<display_id>[^/.]+)'
 
     _TEST = {
@@ -33,18 +29,18 @@ class PornoVoisinesIE(InfoExtractor):
             'subtitles': {
                 'fr': [{
                     'ext': 'vtt',
-                }]
+                }],
             },
-        }
+        },
     }
 
     def _real_extract(self, url):
-        mobj = re.match(self._VALID_URL, url)
+        mobj = self._match_valid_url(url)
         video_id = mobj.group('id')
         display_id = mobj.group('display_id')
 
         settings_url = self._download_json(
-            'http://www.pornovoisines.com/api/video/%s/getsettingsurl/' % video_id,
+            f'http://www.pornovoisines.com/api/video/{video_id}/getsettingsurl/',
             video_id, note='Getting settings URL')['video_settings_url']
         settings = self._download_json(settings_url, video_id)['data']
 
@@ -60,7 +56,6 @@ def _real_extract(self, url):
                         'height': item.get('height'),
                         'bitrate': item.get('bitrate'),
                     })
-        self._sort_formats(formats)
 
         webpage = self._download_webpage(url, video_id)