parent
019a94f7d6
commit
01b052b2b1
1 changed files with 2 additions and 2 deletions
|
@ -16,7 +16,7 @@ from ..utils import (
|
||||||
|
|
||||||
|
|
||||||
class TBSIE(TurnerBaseIE):
|
class TBSIE(TurnerBaseIE):
|
||||||
_VALID_URL = r'https?://(?:www\.)?(?P<site>tbs|tntdrama)\.com(?P<path>/(?:movies|watchtnt|shows/[^/]+/(?:clips|season-\d+/episode-\d+))/(?P<id>[^/?#]+))'
|
_VALID_URL = r'https?://(?:www\.)?(?P<site>tbs|tntdrama)\.com(?P<path>/(?:movies|watchtnt|watchtbs|shows/[^/]+/(?:clips|season-\d+/episode-\d+))/(?P<id>[^/?#]+))'
|
||||||
_TESTS = [{
|
_TESTS = [{
|
||||||
'url': 'http://www.tntdrama.com/shows/the-alienist/clips/monster',
|
'url': 'http://www.tntdrama.com/shows/the-alienist/clips/monster',
|
||||||
'info_dict': {
|
'info_dict': {
|
||||||
|
@ -45,7 +45,7 @@ class TBSIE(TurnerBaseIE):
|
||||||
drupal_settings = self._parse_json(self._search_regex(
|
drupal_settings = self._parse_json(self._search_regex(
|
||||||
r'<script[^>]+?data-drupal-selector="drupal-settings-json"[^>]*?>({.+?})</script>',
|
r'<script[^>]+?data-drupal-selector="drupal-settings-json"[^>]*?>({.+?})</script>',
|
||||||
webpage, 'drupal setting'), display_id)
|
webpage, 'drupal setting'), display_id)
|
||||||
isLive = 'watchtnt' in path
|
isLive = 'watchtnt' in path or 'watchtbs' in path
|
||||||
video_data = next(v for v in drupal_settings['turner_playlist'] if isLive or v.get('url') == path)
|
video_data = next(v for v in drupal_settings['turner_playlist'] if isLive or v.get('url') == path)
|
||||||
|
|
||||||
media_id = video_data['mediaID']
|
media_id = video_data['mediaID']
|
||||||
|
|
Loading…
Reference in a new issue