aboutsummaryrefslogtreecommitdiff
path: root/youtube_dl/extractor/tver.py
diff options
context:
space:
mode:
authorRemita Amine <remitamine@gmail.com>2021-03-12 10:14:28 +0100
committerRemita Amine <remitamine@gmail.com>2021-03-12 10:14:28 +0100
commit43d986acd8bf7247725fc9de34648c0eda560daf (patch)
tree93b430e65b1f4b19aa8ec1734f6a7ad63b5c5830 /youtube_dl/extractor/tver.py
parent9c644a641922e5ac3b5b4a1c9386fa599973e885 (diff)
downloadyoutube-dl-43d986acd8bf7247725fc9de34648c0eda560daf.tar.xz
[tver] improve title extraction(closes #28418)
Diffstat (limited to 'youtube_dl/extractor/tver.py')
-rw-r--r--youtube_dl/extractor/tver.py11
1 files changed, 10 insertions, 1 deletions
diff --git a/youtube_dl/extractor/tver.py b/youtube_dl/extractor/tver.py
index 931d4d650..a54f49319 100644
--- a/youtube_dl/extractor/tver.py
+++ b/youtube_dl/extractor/tver.py
@@ -9,6 +9,7 @@ from ..utils import (
int_or_none,
remove_start,
smuggle_url,
+ strip_or_none,
try_get,
)
@@ -25,6 +26,10 @@ class TVerIE(InfoExtractor):
}, {
'url': 'https://tver.jp/episode/79622438',
'only_matching': True,
+ }, {
+ # subtitle = ' '
+ 'url': 'https://tver.jp/corner/f0068870',
+ 'only_matching': True,
}]
_TOKEN = None
BRIGHTCOVE_URL_TEMPLATE = 'http://players.brightcove.net/%s/default_default/index.html?videoId=%s'
@@ -47,8 +52,12 @@ class TVerIE(InfoExtractor):
}
if service == 'cx':
+ title = main['title']
+ subtitle = strip_or_none(main.get('subtitle'))
+ if subtitle:
+ title += ' - ' + subtitle
info.update({
- 'title': main.get('subtitle') or main['title'],
+ 'title': title,
'url': 'https://i.fod.fujitv.co.jp/plus7/web/%s/%s.html' % (p_id[:4], p_id),
'ie_key': 'FujiTVFODPlus7',
})