]> jfr.im git - yt-dlp.git/blobdiff - yt_dlp/extractor/prosiebensat1.py
[extractor] Deprecate `_sort_formats`
[yt-dlp.git] / yt_dlp / extractor / prosiebensat1.py
index 707146be7e53e2a7413955027126b033286ee286..46e2e8a8fa30457ab99affba94977d6b6ddff93c 100644 (file)
@@ -1,6 +1,3 @@
-# coding: utf-8
-from __future__ import unicode_literals
-
 import re
 
 from hashlib import sha1
@@ -35,7 +32,7 @@ def _extract_video_info(self, url, clip_id):
             })[0]
 
         if not self.get_param('allow_unplayable_formats') and video.get('is_protected') is True:
-            raise ExtractorError('This video is DRM protected.', expected=True)
+            self.report_drm(clip_id)
 
         formats = []
         if self._ACCESS_ID:
@@ -159,7 +156,6 @@ def fix_bitrate(bitrate):
                                 'tbr': tbr,
                                 'format_id': 'http%s' % ('-%d' % tbr if tbr else ''),
                             })
-        self._sort_formats(formats)
 
         return {
             'duration': float_or_none(video.get('duration')),