mirror of
https://github.com/ytdl-org/youtube-dl.git
synced 2024-12-15 13:47:48 +01:00
[mit] Modernize
This commit is contained in:
parent
a16af51873
commit
876bef5937
@ -17,7 +17,7 @@ from ..utils import (
|
||||
|
||||
class TechTVMITIE(InfoExtractor):
|
||||
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 = {
|
||||
'url': 'http://techtv.mit.edu/videos/25418-mit-dna-learning-center-set',
|
||||
@ -31,8 +31,7 @@ class TechTVMITIE(InfoExtractor):
|
||||
}
|
||||
|
||||
def _real_extract(self, url):
|
||||
mobj = re.match(self._VALID_URL, url)
|
||||
video_id = mobj.group('id')
|
||||
video_id = self._match_id(url)
|
||||
raw_page = self._download_webpage(
|
||||
'http://techtv.mit.edu/videos/%s' % video_id, video_id)
|
||||
clean_page = re.compile(r'<!--.*?-->', re.S).sub('', raw_page)
|
||||
|
Loading…
Reference in New Issue
Block a user