1
0
mirror of https://codeberg.org/polarisfm/youtube-dl synced 2024-11-26 10:24:33 +01:00

[trutv] port fixes from tbs

This commit is contained in:
Pika 2020-03-24 20:41:33 -04:00
parent 69b2c9184f
commit ab1788329d

View File

@ -2,6 +2,10 @@
from __future__ import unicode_literals from __future__ import unicode_literals
from .turner import TurnerBaseIE from .turner import TurnerBaseIE
from ..compat import (
compat_urllib_parse_urlparse,
compat_parse_qs,
)
from ..utils import ( from ..utils import (
int_or_none, int_or_none,
) )
@ -44,11 +48,13 @@ class TruTVIE(TurnerBaseIE):
media_id = video_data['mediaID'] media_id = video_data['mediaID']
title = video_data['title'].strip() title = video_data['title'].strip()
tokenizer_query = compat_parse_qs(compat_urllib_parse_urlparse(data['ngtv_token_url']).query)
info = self._extract_ngtv_info( info = self._extract_ngtv_info(
media_id, {}, { media_id, tokenizer_query, {
'url': url, 'url': url,
'site_name': 'truTV', 'site_name': 'truTV',
'auth_required': video_data.get('authRequired'), 'auth_required': video_data.get('authRequired') == '1',
}) })
thumbnails = [] thumbnails = []