]> jfr.im git - yt-dlp.git/blob - yt_dlp/extractor/teachingchannel.py
[ie/orf:on] Improve extraction (#9677)
[yt-dlp.git] / yt_dlp / extractor / teachingchannel.py
1 from .common import InfoExtractor
2
3
4 class TeachingChannelIE(InfoExtractor):
5 _WORKING = False
6 _VALID_URL = r'https?://(?:www\.)?teachingchannel\.org/videos?/(?P<id>[^/?&#]+)'
7
8 _TEST = {
9 'url': 'https://www.teachingchannel.org/videos/teacher-teaming-evolution',
10 'info_dict': {
11 'id': '3swwlzkT',
12 'ext': 'mp4',
13 'title': 'A History of Teaming',
14 'description': 'md5:2a9033db8da81f2edffa4c99888140b3',
15 'duration': 422,
16 'upload_date': '20170316',
17 'timestamp': 1489691297,
18 },
19 'params': {
20 'skip_download': True,
21 },
22 'add_ie': ['JWPlatform'],
23 }
24
25 def _real_extract(self, url):
26 display_id = self._match_id(url)
27 webpage = self._download_webpage(url, display_id)
28 mid = self._search_regex(
29 r'(?:data-mid=["\']|id=["\']jw-video-player-)([a-zA-Z0-9]{8})',
30 webpage, 'media id')
31
32 return self.url_result('jwplatform:' + mid, 'JWPlatform', mid)