+
+
+class TVNowShowIE(TVNowListBaseIE):
+ _VALID_URL = TVNowListBaseIE._SHOW_VALID_URL
+
+ _SHOW_FIELDS = ('id', 'title', )
+ _SEASON_FIELDS = ('id', 'headline', 'seoheadline', )
+ _VIDEO_FIELDS = ()
+
+ _TESTS = [{
+ 'url': 'https://www.tvnow.at/vox/ab-ins-beet',
+ 'info_dict': {
+ 'id': 'ab-ins-beet',
+ 'title': 'Ab ins Beet!',
+ },
+ 'playlist_mincount': 7,
+ }, {
+ 'url': 'https://www.tvnow.at/vox/ab-ins-beet/list',
+ 'only_matching': True,
+ }, {
+ 'url': 'https://www.tvnow.de/rtl2/grip-das-motormagazin/jahr/',
+ 'only_matching': True,
+ }]
+
+ @classmethod
+ def suitable(cls, url):
+ return (False if TVNowIE.suitable(url) or TVNowListIE.suitable(url)
+ else super(TVNowShowIE, cls).suitable(url))
+
+ def _real_extract(self, url):
+ base_url, show_id = re.match(self._VALID_URL, url).groups()
+
+ list_info = self._extract_list_info(show_id, show_id)
+
+ entries = []
+ for season_info in list_info['formatTabs']['items']:
+ season_url = season_info.get('seoheadline')
+ if not season_url:
+ continue
+ season_id = season_info.get('id')
+ entries.append(self.url_result(
+ '%s/list/%s' % (base_url, season_url), TVNowListIE.ie_key(),
+ compat_str(season_id) if season_id else None,
+ season_info.get('headline')))
+
+ return self.playlist_result(entries, show_id, list_info.get('title'))