]> jfr.im git - yt-dlp.git/blobdiff - yt_dlp/extractor/coub.py
[extractor] Deprecate `_sort_formats`
[yt-dlp.git] / yt_dlp / extractor / coub.py
index eba6b73baad555b73e6ac592cd05513b78692307..9bab698a3d22f5c57f956cb1abe4e54ca96a4282 100644 (file)
@@ -1,6 +1,3 @@
-# coding: utf-8
-from __future__ import unicode_literals
-
 from .common import InfoExtractor
 from ..utils import (
     ExtractorError,
@@ -57,7 +54,7 @@ def _real_extract(self, url):
 
         file_versions = coub['file_versions']
 
-        QUALITIES = ('low', 'med', 'high')
+        QUALITIES = ('low', 'med', 'high', 'higher')
 
         MOBILE = 'mobile'
         IPHONE = 'iphone'
@@ -86,6 +83,7 @@ def _real_extract(self, url):
                     'format_id': '%s-%s-%s' % (HTML5, kind, quality),
                     'filesize': int_or_none(item.get('size')),
                     'vcodec': 'none' if kind == 'audio' else None,
+                    'acodec': 'none' if kind == 'video' else None,
                     'quality': quality_key(quality),
                     'source_preference': preference_key(HTML5),
                 })
@@ -106,8 +104,6 @@ def _real_extract(self, url):
                 'source_preference': preference_key(MOBILE),
             })
 
-        self._sort_formats(formats)
-
         thumbnail = coub.get('picture')
         duration = float_or_none(coub.get('duration'))
         timestamp = parse_iso8601(coub.get('published_at') or coub.get('created_at'))