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