-# coding: utf-8
-from __future__ import unicode_literals
-
import re
from .common import InfoExtractor
if formats:
break
else:
- if not self._downloader.params.get('allow_unplayable_formats') and info.get('isDrm'):
+ if not self.get_param('allow_unplayable_formats') and info.get('isDrm'):
raise ExtractorError(
'Video %s is DRM protected' % video_id, expected=True)
if info.get('geoblocked'):
if not info.get('free', True):
raise ExtractorError(
'Video %s is not available for free' % video_id, expected=True)
- self._sort_formats(formats)
description = info.get('articleLong') or info.get('articleShort')
timestamp = parse_iso8601(info.get('broadcastStartDate'), ' ')
}]
def _real_extract(self, url):
- mobj = re.match(self._VALID_URL, url)
+ mobj = self._match_valid_url(url)
display_id = '%s/%s' % mobj.group(2, 3)
info = self._call_api(
}]
def _real_extract(self, url):
- mobj = re.match(self._VALID_URL, url)
+ mobj = self._match_valid_url(url)
base_url = re.sub(r'(?:shows|serien)', '_', mobj.group('base_url'))
show, episode = mobj.group('show', 'episode')
return self.url_result(
}]
def _real_extract(self, url):
- mobj = re.match(self._VALID_URL, url)
+ mobj = self._match_valid_url(url)
display_id = mobj.group('title')
webpage = self._download_webpage(url, display_id, fatal=False)
if not info.get('free', True):
raise ExtractorError(
'Video %s is not available for free' % video_id, expected=True)
- self._sort_formats(formats)
description = source.get('description')
thumbnail = url_or_none(source.get('poster'))
}
def _real_extract(self, url):
- display_id, video_id = re.match(self._VALID_URL, url).groups()
+ display_id, video_id = self._match_valid_url(url).groups()
info = self._call_api('player/' + video_id, video_id)
return self._extract_video(info, video_id, display_id)
-class TVNowFilmIE(TVNowIE):
+class TVNowFilmIE(TVNowIE): # XXX: Do not subclass from concrete IE
_VALID_URL = r'''(?x)
(?P<base_url>https?://
(?:www\.)?tvnow\.(?:de|at|ch)/
}]
def _real_extract(self, url):
- mobj = re.match(self._VALID_URL, url)
+ mobj = self._match_valid_url(url)
display_id = mobj.group('title')
webpage = self._download_webpage(url, display_id, fatal=False)
}]
def _real_extract(self, url):
- _, show_id, season_id = re.match(self._VALID_URL, url).groups()
+ _, show_id, season_id = self._match_valid_url(url).groups()
return self._extract_items(
url, show_id, season_id, {'season': season_id})
}]
def _real_extract(self, url):
- _, show_id, year, month = re.match(self._VALID_URL, url).groups()
+ _, show_id, year, month = self._match_valid_url(url).groups()
return self._extract_items(
url, show_id, '%s-%s' % (year, month), {
'year': int(year),
else super(TVNowShowIE, cls).suitable(url))
def _real_extract(self, url):
- base_url, show_id = re.match(self._VALID_URL, url).groups()
+ base_url, show_id = self._match_valid_url(url).groups()
result = self._call_api(
'teaserrow/format/navigation/' + show_id, show_id)