diff options
Diffstat (limited to 'youtube_dl/extractor/spankwire.py')
| -rw-r--r-- | youtube_dl/extractor/spankwire.py | 18 | 
1 files changed, 9 insertions, 9 deletions
diff --git a/youtube_dl/extractor/spankwire.py b/youtube_dl/extractor/spankwire.py index 32df0a7fb..9e2ad0d99 100644 --- a/youtube_dl/extractor/spankwire.py +++ b/youtube_dl/extractor/spankwire.py @@ -6,7 +6,6 @@ from ..utils import (      compat_urllib_parse_urlparse,      compat_urllib_request,      compat_urllib_parse, -    unescapeHTML,  )  from ..aes import (      aes_decrypt_text @@ -36,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'<div\s+id="descriptionContent">([^<]+)<', 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: @@ -49,10 +49,10 @@ class SpankwireIE(InfoExtractor):          formats = []          for video_url in video_urls: -            path = compat_urllib_parse_urlparse( video_url ).path -            extension = os.path.splitext( path )[1][1:] +            path = compat_urllib_parse_urlparse(video_url).path +            extension = os.path.splitext(path)[1][1:]              format = path.split('/')[4].split('_')[:2] -            format = "-".join( format ) +            format = "-".join(format)              formats.append({                  'url': video_url,                  'ext': extension,  | 
