|
|
@ -17,7 +17,7 @@ from ..utils import (
|
|
|
|
|
|
|
|
|
|
|
|
class TechTVMITIE(InfoExtractor):
|
|
|
|
class TechTVMITIE(InfoExtractor):
|
|
|
|
IE_NAME = 'techtv.mit.edu'
|
|
|
|
IE_NAME = 'techtv.mit.edu'
|
|
|
|
_VALID_URL = r'https?://techtv\.mit\.edu/(videos|embeds)/(?P<id>\d+)'
|
|
|
|
_VALID_URL = r'https?://techtv\.mit\.edu/(?:videos|embeds)/(?P<id>\d+)'
|
|
|
|
|
|
|
|
|
|
|
|
_TEST = {
|
|
|
|
_TEST = {
|
|
|
|
'url': 'http://techtv.mit.edu/videos/25418-mit-dna-learning-center-set',
|
|
|
|
'url': 'http://techtv.mit.edu/videos/25418-mit-dna-learning-center-set',
|
|
|
@ -31,8 +31,7 @@ class TechTVMITIE(InfoExtractor):
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
def _real_extract(self, url):
|
|
|
|
def _real_extract(self, url):
|
|
|
|
mobj = re.match(self._VALID_URL, url)
|
|
|
|
video_id = self._match_id(url)
|
|
|
|
video_id = mobj.group('id')
|
|
|
|
|
|
|
|
raw_page = self._download_webpage(
|
|
|
|
raw_page = self._download_webpage(
|
|
|
|
'http://techtv.mit.edu/videos/%s' % video_id, video_id)
|
|
|
|
'http://techtv.mit.edu/videos/%s' % video_id, video_id)
|
|
|
|
clean_page = re.compile(r'<!--.*?-->', re.S).sub('', raw_page)
|
|
|
|
clean_page = re.compile(r'<!--.*?-->', re.S).sub('', raw_page)
|
|
|
|