diff --git a/youtube_dl/extractor/spankwire.py b/youtube_dl/extractor/spankwire.py index 44d8fa52f..6cdec6ce5 100644 --- a/youtube_dl/extractor/spankwire.py +++ b/youtube_dl/extractor/spankwire.py @@ -3,16 +3,11 @@ from __future__ import unicode_literals import re from .common import InfoExtractor -from ..compat import ( - compat_urllib_parse_unquote, - compat_urllib_parse_urlparse, -) from ..utils import ( + int_or_none, sanitized_Request, - str_to_int, unified_strdate, ) -from ..aes import aes_decrypt_text class SpankwireIE(InfoExtractor): @@ -54,61 +49,48 @@ class SpankwireIE(InfoExtractor): req = sanitized_Request('http://www.' + mobj.group('url')) req.add_header('Cookie', 'age_verified=1') webpage = self._download_webpage(req, video_id) + video_data = self._download_json( + sanitized_Request('https://www.spankwire.com/api/video/' + video_id + '.json'), video_id) - title = self._html_search_regex( + title = video_data.get('title') or self._html_search_regex( r'