|
|
@ -3,6 +3,7 @@ from __future__ import unicode_literals
|
|
|
|
import re
|
|
|
|
import re
|
|
|
|
|
|
|
|
|
|
|
|
from .common import InfoExtractor
|
|
|
|
from .common import InfoExtractor
|
|
|
|
|
|
|
|
from ..utils import ExtractorError
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
class SpankBangIE(InfoExtractor):
|
|
|
|
class SpankBangIE(InfoExtractor):
|
|
|
@ -33,6 +34,10 @@ class SpankBangIE(InfoExtractor):
|
|
|
|
video_id = self._match_id(url)
|
|
|
|
video_id = self._match_id(url)
|
|
|
|
webpage = self._download_webpage(url, video_id)
|
|
|
|
webpage = self._download_webpage(url, video_id)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
if re.search(r'<[^>]+\bid=["\']video_removed', webpage):
|
|
|
|
|
|
|
|
raise ExtractorError(
|
|
|
|
|
|
|
|
'Video %s is not available' % video_id, expected=True)
|
|
|
|
|
|
|
|
|
|
|
|
stream_key = self._html_search_regex(
|
|
|
|
stream_key = self._html_search_regex(
|
|
|
|
r'''var\s+stream_key\s*=\s*['"](.+?)['"]''',
|
|
|
|
r'''var\s+stream_key\s*=\s*['"](.+?)['"]''',
|
|
|
|
webpage, 'stream key')
|
|
|
|
webpage, 'stream key')
|
|
|
|