diff options
author | Philipp Hagemeister <[email protected]> | 2013-11-20 07:45:32 +0100 |
---|---|---|
committer | Philipp Hagemeister <[email protected]> | 2013-11-20 07:45:32 +0100 |
commit | 0ad97bbc056c83d49bc771ac202a9eb8354686de (patch) | |
tree | a83185ec2ac75bedbc1a0131d97e1af37133dd2e | |
parent | c4864091a1f867c4ce74f459c31ac85d96c417ca (diff) | |
download | youtube-dl-0ad97bbc056c83d49bc771ac202a9eb8354686de.tar.gz youtube-dl-0ad97bbc056c83d49bc771ac202a9eb8354686de.zip |
[spankwire] fix check for description
-rw-r--r-- | youtube_dl/extractor/spankwire.py | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/youtube_dl/extractor/spankwire.py b/youtube_dl/extractor/spankwire.py index 794550c81..995b46444 100644 --- a/youtube_dl/extractor/spankwire.py +++ b/youtube_dl/extractor/spankwire.py @@ -35,11 +35,12 @@ class SpankwireIE(InfoExtractor): webpage = self._download_webpage(req, video_id) 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) - thumbnail = self._html_search_regex(r'flashvars\.image_url = "([^"]+)', webpage, u'thumbnail', fatal=False) - description = self._html_search_regex(r'>\s*Description:</div>\s*<[^>]*>([^<]+)', webpage, u'description', fatal=False) - if len(description) == 0: - description = None + video_uploader = self._html_search_regex( + r'by:\s*<a [^>]*>(.+?)</a>', webpage, u'uploader', fatal=False) + thumbnail = self._html_search_regex( + r'flashvars\.image_url = "([^"]+)', webpage, u'thumbnail', fatal=False) + 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))) if webpage.find('flashvars\.encrypted = "true"') != -1: |