kopia lustrzana https://github.com/yt-dlp/yt-dlp
Porównaj commity
4 Commity
cb263d259d
...
6ecc9f28a6
Autor | SHA1 | Data |
---|---|---|
ischmidt20 | 6ecc9f28a6 | |
bashonly | 89f535e265 | |
ischmidt20 | e942e36a87 | |
ischmidt20 | 6bbbf7954d |
|
@ -53,7 +53,7 @@ jobs:
|
|||
with:
|
||||
python-version: ${{ matrix.python-version }}
|
||||
- name: Install test requirements
|
||||
run: python3 ./devscripts/install_deps.py --include dev --include curl_cffi
|
||||
run: python3 ./devscripts/install_deps.py --include dev --include curl-cffi
|
||||
- name: Run tests
|
||||
continue-on-error: False
|
||||
run: |
|
||||
|
|
|
@ -13,7 +13,7 @@ from ..utils import (
|
|||
|
||||
|
||||
class TBSIE(TurnerBaseIE):
|
||||
_VALID_URL = r'https?://(?:www\.)?(?P<site>tbs|tntdrama)\.com(?P<path>/(?:movies|watchtnt|watchtbs|shows/[^/]+/(?:clips|season-\d+/episode-\d+))/(?P<id>[^/?#]+))'
|
||||
_VALID_URL = r'https?://(?:www\.)?(?P<site>tbs|tntdrama|trutv)\.com(?P<path>/(?:movies|watchtnt|watchtbs|watchtrutv|shows/[^/]+/(?:clips|season-\d+/episode-\d+))/(?P<id>[^/?#]+))'
|
||||
_TESTS = [{
|
||||
'url': 'http://www.tntdrama.com/shows/the-alienist/clips/monster',
|
||||
'info_dict': {
|
||||
|
@ -34,6 +34,9 @@ class TBSIE(TurnerBaseIE):
|
|||
}, {
|
||||
'url': 'http://www.tntdrama.com/movies/star-wars-a-new-hope',
|
||||
'only_matching': True,
|
||||
}, {
|
||||
'url': 'https://www.trutv.com/watchtrutv/east',
|
||||
'only_matching': True,
|
||||
}]
|
||||
|
||||
def _real_extract(self, url):
|
||||
|
@ -42,7 +45,7 @@ class TBSIE(TurnerBaseIE):
|
|||
drupal_settings = self._parse_json(self._search_regex(
|
||||
r'<script[^>]+?data-drupal-selector="drupal-settings-json"[^>]*?>({.+?})</script>',
|
||||
webpage, 'drupal setting'), display_id)
|
||||
isLive = 'watchtnt' in path or 'watchtbs' in path
|
||||
isLive = 'watchtnt' in path or 'watchtbs' in path or 'watchtrutv' in path
|
||||
video_data = next(v for v in drupal_settings['turner_playlist'] if isLive or v.get('url') == path)
|
||||
|
||||
media_id = video_data['mediaID']
|
||||
|
@ -53,7 +56,7 @@ class TBSIE(TurnerBaseIE):
|
|||
info = self._extract_ngtv_info(
|
||||
media_id, tokenizer_query, {
|
||||
'url': url,
|
||||
'site_name': site[:3].upper(),
|
||||
'site_name': {'tbs': 'TBS', 'tnt': 'TNT', 'trutv': 'truTV'}[site],
|
||||
'auth_required': video_data.get('authRequired') == '1' or isLive,
|
||||
'is_live': isLive
|
||||
})
|
||||
|
|
Ładowanie…
Reference in New Issue