mirror of
https://github.com/l1ving/youtube-dl
synced 2025-03-10 07:47:45 +08:00
[tver] fix to more verbose code
This commit is contained in:
parent
e57602b380
commit
a109b5fe11
@ -111,9 +111,8 @@ class TVerIE(BrightcoveNewIE):
|
|||||||
|
|
||||||
# get video description
|
# get video description
|
||||||
description = \
|
description = \
|
||||||
self._og_search_description(webpage) or \
|
self._html_search_meta(['description', 'og:description', 'twitter:description'], webpage, 'description', default=None) or \
|
||||||
self._html_search_meta('twitter:description', webpage) or \
|
self._html_search_regex(r'<div[^>]+class="description"[^>]*>(?P<description>.*?)</div>', webpage, 'description', default=None, flags=re.DOTALL)
|
||||||
self._html_search_regex(r'<div class="description">(?P<description>.*?)</div>', webpage, 'description', default=None, flags=re.DOTALL)
|
|
||||||
|
|
||||||
# undo _VALID_URL
|
# undo _VALID_URL
|
||||||
self._VALID_URL = _VALID_URL
|
self._VALID_URL = _VALID_URL
|
||||||
@ -123,7 +122,7 @@ class TVerIE(BrightcoveNewIE):
|
|||||||
# Brightcove ID
|
# Brightcove ID
|
||||||
info_dict['display_id'] = brightcove_video_id
|
info_dict['display_id'] = brightcove_video_id
|
||||||
# select large thumbnail
|
# select large thumbnail
|
||||||
info_dict['thumbnail'] = info_dict['thumbnail'].replace('160x90', '1920x1080')
|
info_dict['thumbnail'] = info_dict.get('thumbnail').replace('160x90', '1920x1080')
|
||||||
# desctiption
|
# desctiption
|
||||||
info_dict['description'] = description
|
info_dict['description'] = description
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user