mirror of
https://github.com/l1ving/youtube-dl
synced 2020-11-18 19:53:54 -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,
|
url_or_none,
|
||||||
urlencode_postdata,
|
urlencode_postdata,
|
||||||
unescapeHTML,
|
unescapeHTML,
|
||||||
extract_attributes,
|
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|
||||||
@ -94,10 +93,12 @@ class VivoIE(SharedBaseIE):
|
|||||||
}
|
}
|
||||||
|
|
||||||
def _extract_title(self, webpage):
|
def _extract_title(self, webpage):
|
||||||
stream_content = extract_attributes(self._search_regex(
|
data_title = self._search_regex(
|
||||||
r'(<div[^>]+class="[^"]*stream-content[^"]*"[^>]*>)',
|
r'data-name\s*=\s*(["\'])(?P<title>(?:(?!\1).)+)\1', webpage,
|
||||||
webpage, 'stream-content element'))
|
'title', default=None, group='title')
|
||||||
return stream_content['data-name'] or self._og_search_title(webpage)
|
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 _extract_video_url(self, webpage, video_id, *args):
|
||||||
def decode_url(encoded_url):
|
def decode_url(encoded_url):
|
||||||
|
Loading…
x
Reference in New Issue
Block a user