- def _real_extract(self, url):
- video_id = self._match_id(url)
-
- webpage = self._download_webpage(url, video_id)
-
- partner_id = self._search_regex(
- r'<script[^>]+src=["\'](?:https?:)?//(?:[^/]+\.)?kaltura\.com(?:/[^/]+)*/(?:p|partner_id)/([0-9]+)',
- webpage, 'kaltura partner id')
- entry_id = self._html_search_regex(
- r'<a[^>]+data-id=(["\'])(?P<id>(?:(?!\1).)+)\1[^>]+data-slug=["\']%s'
- % re.escape(video_id), webpage, 'kaltura entry id', group='id')
-
- return self._kaltura_video(partner_id, entry_id)
-
-
-class AZMedienPlaylistIE(AZMedienBaseIE):
- IE_DESC = 'AZ Medien playlists'
- _VALID_URL = r'''(?x)
- https?://
- (?:www\.)?
- (?:
- telezueri\.ch|
- telebaern\.tv|
- telem1\.ch
- )/
- (?P<id>[0-9]+-
- (?:
- show|
- topic|
- themen
- )-[^/\#]+
- (?:
- /[0-9]+-episode-[^/\#]+
- )?
- )$
- '''
-
- _TESTS = [{
- # URL with 'episode'
- 'url': 'http://www.telebaern.tv/118-show-news/13735-episode-donnerstag-15-dezember-2016',
- 'info_dict': {
- 'id': '118-show-news/13735-episode-donnerstag-15-dezember-2016',
- 'title': 'News - Donnerstag, 15. Dezember 2016',
- },
- 'playlist_count': 9,
- }, {
- # URL with 'themen'
- 'url': 'http://www.telem1.ch/258-themen-tele-m1-classics',
- 'info_dict': {
- 'id': '258-themen-tele-m1-classics',
- 'title': 'Tele M1 Classics',
- },
- 'playlist_mincount': 15,
- }, {
- # URL with 'topic', contains nested playlists
- 'url': 'http://www.telezueri.ch/219-topic-aera-trump-hat-offiziell-begonnen',
- 'only_matching': True,
- }, {
- # URL with 'show' only
- 'url': 'http://www.telezueri.ch/86-show-talktaeglich',
- 'only_matching': True
- }]