mirror of
https://github.com/ytdl-org/youtube-dl.git
synced 2024-11-22 02:01:50 +00:00
[tver] improve title extraction(closes #28418)
This commit is contained in:
parent
9c644a6419
commit
43d986acd8
1 changed files with 10 additions and 1 deletions
|
@ -9,6 +9,7 @@ from ..utils import (
|
||||||
int_or_none,
|
int_or_none,
|
||||||
remove_start,
|
remove_start,
|
||||||
smuggle_url,
|
smuggle_url,
|
||||||
|
strip_or_none,
|
||||||
try_get,
|
try_get,
|
||||||
)
|
)
|
||||||
|
|
||||||
|
@ -25,6 +26,10 @@ class TVerIE(InfoExtractor):
|
||||||
}, {
|
}, {
|
||||||
'url': 'https://tver.jp/episode/79622438',
|
'url': 'https://tver.jp/episode/79622438',
|
||||||
'only_matching': True,
|
'only_matching': True,
|
||||||
|
}, {
|
||||||
|
# subtitle = ' '
|
||||||
|
'url': 'https://tver.jp/corner/f0068870',
|
||||||
|
'only_matching': True,
|
||||||
}]
|
}]
|
||||||
_TOKEN = None
|
_TOKEN = None
|
||||||
BRIGHTCOVE_URL_TEMPLATE = 'http://players.brightcove.net/%s/default_default/index.html?videoId=%s'
|
BRIGHTCOVE_URL_TEMPLATE = 'http://players.brightcove.net/%s/default_default/index.html?videoId=%s'
|
||||||
|
@ -47,8 +52,12 @@ class TVerIE(InfoExtractor):
|
||||||
}
|
}
|
||||||
|
|
||||||
if service == 'cx':
|
if service == 'cx':
|
||||||
|
title = main['title']
|
||||||
|
subtitle = strip_or_none(main.get('subtitle'))
|
||||||
|
if subtitle:
|
||||||
|
title += ' - ' + subtitle
|
||||||
info.update({
|
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),
|
'url': 'https://i.fod.fujitv.co.jp/plus7/web/%s/%s.html' % (p_id[:4], p_id),
|
||||||
'ie_key': 'FujiTVFODPlus7',
|
'ie_key': 'FujiTVFODPlus7',
|
||||||
})
|
})
|
||||||
|
|
Loading…
Reference in a new issue