2 from __future__ import unicode_literals
4 from .common import InfoExtractor
5 from .nexx import NexxIE
6 from ..compat import compat_urlparse
9 class Tele5IE(InfoExtractor):
10 _VALID_URL = r'https?://(?:www\.)?tele5\.de/(?:mediathek|tv)/(?P<id>[^?#&]+)'
12 'url': 'https://www.tele5.de/mediathek/filme-online/videos?vid=1549416',
16 'upload_date': '20180814',
17 'timestamp': 1534290623,
21 'skip_download': True,
24 'url': 'https://www.tele5.de/tv/kalkofes-mattscheibe/video-clips/politik-und-gesellschaft?ve_id=1551191',
25 'only_matching': True,
27 'url': 'https://www.tele5.de/tv/dark-matter/videos',
28 'only_matching': True,
31 def _real_extract(self, url):
32 qs = compat_urlparse.parse_qs(compat_urlparse.urlparse(url).query)
33 video_id = (qs.get('vid') or qs.get('ve_id') or [None])[0]
36 display_id = self._match_id(url)
37 webpage = self._download_webpage(url, display_id)
38 video_id = self._html_search_regex(
39 r'id\s*=\s*["\']video-player["\'][^>]+data-id\s*=\s*["\'](\d+)',
42 return self.url_result(
43 'https://api.nexx.cloud/v3/759/videos/byid/%s' % video_id,
44 ie=NexxIE.ie_key(), video_id=video_id)