mirror of
https://github.com/yt-dlp/yt-dlp.git
synced 2024-12-25 17:52:04 +00:00
[spankwire] fix check for description
This commit is contained in:
parent
c4864091a1
commit
0ad97bbc05
1 changed files with 6 additions and 5 deletions
|
@ -35,11 +35,12 @@ def _real_extract(self, url):
|
||||||
webpage = self._download_webpage(req, video_id)
|
webpage = self._download_webpage(req, video_id)
|
||||||
|
|
||||||
video_title = self._html_search_regex(r'<h1>([^<]+)', webpage, u'title')
|
video_title = self._html_search_regex(r'<h1>([^<]+)', webpage, u'title')
|
||||||
video_uploader = self._html_search_regex(r'by:\s*<a [^>]*>(.+?)</a>', webpage, u'uploader', fatal=False)
|
video_uploader = self._html_search_regex(
|
||||||
thumbnail = self._html_search_regex(r'flashvars\.image_url = "([^"]+)', webpage, u'thumbnail', fatal=False)
|
r'by:\s*<a [^>]*>(.+?)</a>', webpage, u'uploader', fatal=False)
|
||||||
description = self._html_search_regex(r'>\s*Description:</div>\s*<[^>]*>([^<]+)', webpage, u'description', fatal=False)
|
thumbnail = self._html_search_regex(
|
||||||
if len(description) == 0:
|
r'flashvars\.image_url = "([^"]+)', webpage, u'thumbnail', fatal=False)
|
||||||
description = None
|
description = self._html_search_regex(
|
||||||
|
r'>\s*Description:</div>\s*<[^>]+>([^<]+)', webpage, u'description', fatal=False)
|
||||||
|
|
||||||
video_urls = list(map(compat_urllib_parse.unquote , re.findall(r'flashvars\.quality_[0-9]{3}p = "([^"]+)', webpage)))
|
video_urls = list(map(compat_urllib_parse.unquote , re.findall(r'flashvars\.quality_[0-9]{3}p = "([^"]+)', webpage)))
|
||||||
if webpage.find('flashvars\.encrypted = "true"') != -1:
|
if webpage.find('flashvars\.encrypted = "true"') != -1:
|
||||||
|
|
Loading…
Reference in a new issue