]> jfr.im git - yt-dlp.git/blame - youtube_dl/extractor/teachingchannel.py
Merge pull request #8061 from dstftw/introduce-chapter-and-series-fields
[yt-dlp.git] / youtube_dl / extractor / teachingchannel.py
CommitLineData
566bd96d
JMF
1from __future__ import unicode_literals
2
3import re
4
5from .common import InfoExtractor
6from .ooyala import OoyalaIE
7
8
9class TeachingChannelIE(InfoExtractor):
10 _VALID_URL = r'https?://www\.teachingchannel\.org/videos/(?P<title>.+)'
11
12 _TEST = {
13 'url': 'https://www.teachingchannel.org/videos/teacher-teaming-evolution',
14 'info_dict': {
15 'id': 'F3bnlzbToeI6pLEfRyrlfooIILUjz4nM',
16 'ext': 'mp4',
17 'title': 'A History of Teaming',
18 'description': 'md5:2a9033db8da81f2edffa4c99888140b3',
53e06b25 19 'duration': 422.255,
566bd96d
JMF
20 },
21 'params': {
22 # m3u8 download
23 'skip_download': True,
24 },
25 }
26
27 def _real_extract(self, url):
28 mobj = re.match(self._VALID_URL, url)
29 title = mobj.group('title')
30 webpage = self._download_webpage(url, title)
31 ooyala_code = self._search_regex(
32 r'data-embed-code=\'(.+?)\'', webpage, 'ooyala code')
33
34 return OoyalaIE._build_url_result(ooyala_code)