mirror of
https://github.com/l1ving/youtube-dl
synced 2025-03-09 22:47:20 +08:00
- Returned to regex to extract title.
This commit is contained in:
parent
0b0b0cf4d7
commit
2ff2b5ff79
@ -10,7 +10,6 @@ from ..utils import (
|
||||
url_or_none,
|
||||
urlencode_postdata,
|
||||
unescapeHTML,
|
||||
extract_attributes,
|
||||
)
|
||||
|
||||
|
||||
@ -94,10 +93,12 @@ class VivoIE(SharedBaseIE):
|
||||
}
|
||||
|
||||
def _extract_title(self, webpage):
|
||||
stream_content = extract_attributes(self._search_regex(
|
||||
r'(<div[^>]+class="[^"]*stream-content[^"]*"[^>]*>)',
|
||||
webpage, 'stream-content element'))
|
||||
return stream_content['data-name'] or self._og_search_title(webpage)
|
||||
data_title = self._search_regex(
|
||||
r'data-name\s*=\s*(["\'])(?P<title>(?:(?!\1).)+)\1', webpage,
|
||||
'title', default=None, group='title')
|
||||
if data_title:
|
||||
return unescapeHTML(re.sub(r"\.[a-z0-9]{3,4}$", "", data_title))
|
||||
return self._og_search_title(webpage)
|
||||
|
||||
def _extract_video_url(self, webpage, video_id, *args):
|
||||
def decode_url(encoded_url):
|
||||
|
Loading…
x
Reference in New Issue
Block a user