X-Git-Url: http://git.bitcoin.ninja/index.cgi?a=blobdiff_plain;f=youtube_dl%2Fextractor%2Fspankwire.py;h=0a35c2b3b5b97f32b11c6022aad7033a6193a2b3;hb=9990c960f2d944cfbecb7d613062b98fe99464a7;hp=b936202f6f3005fe9ae085724566d709c6a484cc;hpb=d5524947b560c1d0e1dfa2ef7f1969efe07866fa;p=youtube-dl diff --git a/youtube_dl/extractor/spankwire.py b/youtube_dl/extractor/spankwire.py index b936202f6..0a35c2b3b 100644 --- a/youtube_dl/extractor/spankwire.py +++ b/youtube_dl/extractor/spankwire.py @@ -4,7 +4,7 @@ import re from .common import InfoExtractor from ..compat import ( - compat_urllib_parse, + compat_urllib_parse_unquote, compat_urllib_parse_urlparse, compat_urllib_request, ) @@ -27,7 +27,7 @@ class SpankwireIE(InfoExtractor): 'description': 'Crazy Bitch X rated music video.', 'uploader': 'oreusz', 'uploader_id': '124697', - 'upload_date': '20070508', + 'upload_date': '20070507', 'age_limit': 18, } } @@ -44,7 +44,7 @@ class SpankwireIE(InfoExtractor): title = self._html_search_regex( r'

([^<]+)', webpage, 'title') description = self._html_search_regex( - r'([^<]+)<', + r'(?s)(.+?)', webpage, 'description', fatal=False) thumbnail = self._html_search_regex( r'playerData\.screenShot\s*=\s*["\']([^"\']+)["\']', @@ -54,7 +54,7 @@ class SpankwireIE(InfoExtractor): r'by:\s*]*>(.+?)', webpage, 'uploader', fatal=False) uploader_id = self._html_search_regex( - r'by:\s* on (.+?) at \d+:\d+', @@ -64,14 +64,14 @@ class SpankwireIE(InfoExtractor): r'
([\d,\.]+) views
', webpage, 'view count', fatal=False)) comment_count = str_to_int(self._html_search_regex( - r'Comments]+>\s*\(([\d,\.]+)\)', + r']*>([\d,\.]+)', webpage, 'comment count', fatal=False)) video_urls = list(map( - compat_urllib_parse.unquote, - re.findall(r'playerData\.cdnPath[0-9]{3,}\s*=\s*["\']([^"\']+)["\']', webpage))) + compat_urllib_parse_unquote, + re.findall(r'playerData\.cdnPath[0-9]{3,}\s*=\s*(?:encodeURIComponent\()?["\']([^"\']+)["\']', webpage))) if webpage.find('flashvars\.encrypted = "true"') != -1: - password = self._html_search_regex( + password = self._search_regex( r'flashvars\.video_title = "([^"]+)', webpage, 'password').replace('+', ' ') video_urls = list(map(