-# 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',
else:
frmt['height'] = str_to_int(resolution.replace('p', ''))
formats.append(frmt)
- self._sort_formats(formats)
return {
'id': id,
} 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}',