mirror of https://github.com/yt-dlp/yt-dlp
You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
34 lines
1.0 KiB
Python
34 lines
1.0 KiB
Python
11 years ago
|
from __future__ import unicode_literals
|
||
|
|
||
|
from .common import InfoExtractor
|
||
|
|
||
|
|
||
|
class TeachingChannelIE(InfoExtractor):
|
||
5 years ago
|
_VALID_URL = r'https?://(?:www\.)?teachingchannel\.org/videos?/(?P<id>[^/?&#]+)'
|
||
11 years ago
|
|
||
|
_TEST = {
|
||
|
'url': 'https://www.teachingchannel.org/videos/teacher-teaming-evolution',
|
||
|
'info_dict': {
|
||
5 years ago
|
'id': '3swwlzkT',
|
||
11 years ago
|
'ext': 'mp4',
|
||
|
'title': 'A History of Teaming',
|
||
|
'description': 'md5:2a9033db8da81f2edffa4c99888140b3',
|
||
5 years ago
|
'duration': 422,
|
||
|
'upload_date': '20170316',
|
||
|
'timestamp': 1489691297,
|
||
11 years ago
|
},
|
||
9 years ago
|
'params': {
|
||
|
'skip_download': True,
|
||
|
},
|
||
5 years ago
|
'add_ie': ['JWPlatform'],
|
||
11 years ago
|
}
|
||
|
|
||
|
def _real_extract(self, url):
|
||
5 years ago
|
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')
|
||
11 years ago
|
|
||
5 years ago
|
return self.url_result('jwplatform:' + mid, 'JWPlatform', mid)
|