2 from __future__ import unicode_literals
6 from .common import InfoExtractor
14 class Lecture2GoIE(InfoExtractor):
15 _VALID_URL = r'https?://lecture2go\.uni-hamburg\.de/veranstaltungen/-/v/(?P<id>\d+)'
17 'url': 'https://lecture2go.uni-hamburg.de/veranstaltungen/-/v/17473',
18 'md5': 'ac02b570883020d208d405d5a3fd2f7f',
22 'title': '2 - Endliche Automaten und reguläre Sprachen',
23 'creator': 'Frank Heitmann',
28 def _real_extract(self, url):
29 video_id = self._match_id(url)
30 webpage = self._download_webpage(url, video_id)
32 title = self._html_search_regex(r'<em[^>]+class="title">(.+)</em>', webpage, 'title')
35 for url in set(re.findall(r'"src","([^"]+)"', webpage)):
36 ext = determine_ext(url)
38 formats.extend(self._extract_f4m_formats(url, video_id))
40 formats.extend(self._extract_m3u8_formats(url, video_id))
46 self._sort_formats(formats)
48 creator = self._html_search_regex(
49 r'<div[^>]+id="description">([^<]+)</div>', webpage, 'creator', fatal=False)
50 duration = parse_duration(self._html_search_regex(
51 r'Duration:\s*</em>\s*<em[^>]*>([^<]+)</em>', webpage, 'duration', fatal=False))
52 view_count = int_or_none(self._html_search_regex(
53 r'Views:\s*</em>\s*<em[^>]+>(\d+)</em>', webpage, 'view count', fatal=False))
61 'view_count': view_count,