-# coding: utf-8
-from __future__ import unicode_literals
-
import re
from .common import InfoExtractor
_PLAYLIST_SERVICE_URL = 'http://production-ps.lvp.llnw.net/r/PlaylistService/%s/%s/%s'
@classmethod
- def _extract_urls(cls, webpage, source_url):
+ def _extract_embed_urls(cls, url, webpage):
lm = {
'Media': 'media',
'Channel': 'channel',
}
def smuggle(url):
- return smuggle_url(url, {'source_url': source_url})
+ return smuggle_url(url, {'source_url': url})
entries = []
for kind, video_id in re.findall(
stream_url = stream.get('url')
if not stream_url or stream_url in urls:
continue
- if not self._downloader.params.get('allow_unplayable_formats') and stream.get('drmProtected'):
+ if not self.get_param('allow_unplayable_formats') and stream.get('drmProtected'):
continue
urls.append(stream_url)
ext = determine_ext(stream_url)
if not media_url or media_url in urls:
continue
if (format_id in ('Widevine', 'SmoothStreaming')
- and not self._downloader.params.get('allow_unplayable_formats', False)):
+ and not self.get_param('allow_unplayable_formats', False)):
continue
urls.append(media_url)
ext = determine_ext(media_url)
cc_url = cc.get('webvttFileUrl')
if not cc_url:
continue
- lang = cc.get('languageCode') or self._search_regex(r'/[a-z]{2}\.vtt', cc_url, 'lang', default='en')
+ lang = cc.get('languageCode') or self._search_regex(r'/([a-z]{2})\.vtt', cc_url, 'lang', default='en')
subtitles.setdefault(lang, []).append({
'url': cc_url,
})