]> jfr.im git - yt-dlp.git/blobdiff - yt_dlp/extractor/pornflip.py
[ie/matchtv] Fix extractor (#10190)
[yt-dlp.git] / yt_dlp / extractor / pornflip.py
index d0aefa2dd5233f2cfb9b01c13239a9c1eb3d7738..bc684fd6fc9bed3b4c20871839acfc7a0b5eee71 100644 (file)
@@ -1,12 +1,5 @@
-# coding: utf-8
-from __future__ import unicode_literals
-
 from .common import InfoExtractor
-from ..utils import (
-    int_or_none,
-    parse_duration,
-    parse_iso8601
-)
+from ..utils import int_or_none, parse_duration, parse_iso8601
 
 
 class PornFlipIE(InfoExtractor):
@@ -29,7 +22,6 @@ class PornFlipIE(InfoExtractor):
                 'age_limit': 18,
             },
             'params': {
-                'format': 'bestvideo',
                 'skip_download': True,
             },
         },
@@ -51,7 +43,7 @@ class PornFlipIE(InfoExtractor):
     def _real_extract(self, url):
         video_id = self._match_id(url)
         webpage = self._download_webpage(
-            'https://{}/sv/{}'.format(self._HOST, video_id), video_id, headers={'host': self._HOST})
+            f'https://{self._HOST}/sv/{video_id}', video_id, headers={'host': self._HOST})
         description = self._html_search_regex(r'&p\[summary\]=(.*?)\s*&p', webpage, 'description', fatal=False)
         duration = self._search_regex(r'"duration":\s+"([^"]+)",', webpage, 'duration', fatal=False)
         view_count = self._search_regex(r'"interactionCount":\s+"([^"]+)"', webpage, 'view_count', fatal=False)
@@ -64,7 +56,6 @@ def _real_extract(self, url):
             r'class="btn btn-down-rating[^>]*>[^<]*<i[^>]*>[^<]*</i>[^>]*<span[^>]*>[^0-9]*([0-9]+)[^<0-9]*<', webpage, 'dislike_count', fatal=False)
         mpd_url = self._search_regex(r'"([^"]+userscontent.net/dash/[0-9]+/manifest.mpd[^"]*)"', webpage, 'mpd_url').replace('&amp;', '&')
         formats = self._extract_mpd_formats(mpd_url, video_id, mpd_id='dash')
-        self._sort_formats(formats)
 
         return {
             'age_limit': 18,