]> Raphaƫl G. Git Repositories - youtubedl/blob - youtube_dl/extractor/teachingchannel.py
debian/watch: Skip pgpsigurlmangle for the moment.
[youtubedl] / youtube_dl / extractor / teachingchannel.py
1 from __future__ import unicode_literals
2
3 import re
4
5 from .common import InfoExtractor
6 from .ooyala import OoyalaIE
7
8
9 class 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',
19 'duration': 422.255,
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)