]> jfr.im git - yt-dlp.git/blobdiff - yt_dlp/extractor/gab.py
[ie/orf:on] Improve extraction (#9677)
[yt-dlp.git] / yt_dlp / extractor / gab.py
index bde6e86248bd5286b669d920a1e7e68432c3ec60..f9d22fd3381c2d4c1a34e8dc24c27f1b76f718b7 100644 (file)
@@ -1,6 +1,3 @@
-# coding: utf-8
-from __future__ import unicode_literals
-
 import re
 
 from .common import InfoExtractor
 
 
 class GabTVIE(InfoExtractor):
-    _VALID_URL = r'(?:https?://)tv.gab.com/channel/[^/]+/view/(?P<id>[a-z0-9-]+)'
+    _VALID_URL = r'https?://tv\.gab\.com/channel/[^/]+/view/(?P<id>[a-z0-9-]+)'
     _TESTS = [{
         'url': 'https://tv.gab.com/channel/wurzelroot/view/why-was-america-in-afghanistan-61217eacea5665de450d0488',
         'info_dict': {
             'id': '61217eacea5665de450d0488',
             'ext': 'mp4',
             'title': 'WHY WAS AMERICA IN AFGHANISTAN - AMERICA FIRST AGAINST AMERICAN OLIGARCHY',
-            'description': None,
             'uploader': 'Wurzelroot',
             'uploader_id': '608fb0a85738fd1974984f7d',
             'thumbnail': 'https://tv.gab.com/image/61217eacea5665de450d0488',
@@ -57,7 +53,6 @@ def _real_extract(self, url):
             else:
                 frmt['height'] = str_to_int(resolution.replace('p', ''))
             formats.append(frmt)
-        self._sort_formats(formats)
 
         return {
             'id': id,
@@ -123,8 +118,6 @@ def _real_extract(self, url):
             } for url, f in ((media.get('url'), metadata.get('original') or {}),
                              (media.get('source_mp4'), metadata.get('playable') or {})) if url]
 
-            self._sort_formats(formats)
-
             author = json_data.get('account') or {}
             entries.append({
                 'id': f'{post_id}-{idx}',