2014-06-07 13:09:21 +02:00
|
|
|
from __future__ import unicode_literals
|
|
|
|
|
|
|
|
from .common import InfoExtractor
|
|
|
|
|
|
|
|
|
|
|
|
class TeachingChannelIE(InfoExtractor):
|
2019-11-30 23:49:45 +01:00
|
|
|
_VALID_URL = r'https?://(?:www\.)?teachingchannel\.org/videos?/(?P<id>[^/?&#]+)'
|
2014-06-07 13:09:21 +02:00
|
|
|
|
|
|
|
_TEST = {
|
|
|
|
'url': 'https://www.teachingchannel.org/videos/teacher-teaming-evolution',
|
|
|
|
'info_dict': {
|
2019-11-30 23:49:45 +01:00
|
|
|
'id': '3swwlzkT',
|
2014-06-07 13:09:21 +02:00
|
|
|
'ext': 'mp4',
|
|
|
|
'title': 'A History of Teaming',
|
|
|
|
'description': 'md5:2a9033db8da81f2edffa4c99888140b3',
|
2019-11-30 23:49:45 +01:00
|
|
|
'duration': 422,
|
|
|
|
'upload_date': '20170316',
|
|
|
|
'timestamp': 1489691297,
|
2014-06-07 13:09:21 +02:00
|
|
|
},
|
2016-05-24 17:42:22 +02:00
|
|
|
'params': {
|
|
|
|
'skip_download': True,
|
|
|
|
},
|
2019-11-30 23:49:45 +01:00
|
|
|
'add_ie': ['JWPlatform'],
|
2014-06-07 13:09:21 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
def _real_extract(self, url):
|
2019-11-30 23:49:45 +01:00
|
|
|
display_id = self._match_id(url)
|
|
|
|
webpage = self._download_webpage(url, display_id)
|
|
|
|
mid = self._search_regex(
|
|
|
|
r'(?:data-mid=["\']|id=["\']jw-video-player-)([a-zA-Z0-9]{8})',
|
|
|
|
webpage, 'media id')
|
2014-06-07 13:09:21 +02:00
|
|
|
|
2019-11-30 23:49:45 +01:00
|
|
|
return self.url_result('jwplatform:' + mid, 'JWPlatform', mid)
|