X-Git-Url: http://git.bitcoin.ninja/index.cgi?a=blobdiff_plain;f=youtube_dl%2Fextractor%2Fspankwire.py;h=b936202f6f3005fe9ae085724566d709c6a484cc;hb=a55e2f04a046c91801cf65a54cd01968fa27e0ae;hp=21491027ab2119a966d3ccca4b127c55c7de4644;hpb=fdb4d278bf6c2481778e01ab0ff25c2050664f1c;p=youtube-dl diff --git a/youtube_dl/extractor/spankwire.py b/youtube_dl/extractor/spankwire.py index 21491027a..b936202f6 100644 --- a/youtube_dl/extractor/spankwire.py +++ b/youtube_dl/extractor/spankwire.py @@ -3,12 +3,14 @@ from __future__ import unicode_literals import re from .common import InfoExtractor -from ..utils import ( +from ..compat import ( + compat_urllib_parse, compat_urllib_parse_urlparse, compat_urllib_request, - compat_urllib_parse, - unified_strdate, +) +from ..utils import ( str_to_int, + unified_strdate, ) from ..aes import aes_decrypt_text @@ -45,7 +47,7 @@ class SpankwireIE(InfoExtractor): r'([^<]+)<', webpage, 'description', fatal=False) thumbnail = self._html_search_regex( - r'playerData\.screenShot\s*=\s*"([^"]+)"', + r'playerData\.screenShot\s*=\s*["\']([^"\']+)["\']', webpage, 'thumbnail', fatal=False) uploader = self._html_search_regex( @@ -67,7 +69,7 @@ class SpankwireIE(InfoExtractor): video_urls = list(map( compat_urllib_parse.unquote, - re.findall(r'playerData\.cdnPath[0-9]{3,}\s*=\s*"([^"]+)', webpage))) + re.findall(r'playerData\.cdnPath[0-9]{3,}\s*=\s*["\']([^"\']+)["\']', webpage))) if webpage.find('flashvars\.encrypted = "true"') != -1: password = self._html_search_regex( r'flashvars\.video_title = "([^"]+)',