1 from __future__ import unicode_literals
3 from .common import InfoExtractor
9 class VideoLecturesNetIE(InfoExtractor):
10 _VALID_URL = r'http://(?:www\.)?videolectures\.net/(?P<id>[^/#?]+)/*(?:[#?].*)?$'
11 IE_NAME = 'videolectures.net'
14 'url': 'http://videolectures.net/promogram_igor_mekjavic_eng/',
16 'id': 'promogram_igor_mekjavic_eng',
18 'title': 'Automatics, robotics and biocybernetics',
19 'description': 'md5:815fc1deb6b3a2bff99de2d5325be482',
20 'upload_date': '20130627',
22 'thumbnail': 're:http://.*\.jpg',
26 def _real_extract(self, url):
27 video_id = self._match_id(url)
29 smil_url = 'http://videolectures.net/%s/video/1/smil.xml' % video_id
30 smil = self._download_smil(smil_url, video_id)
32 info = self._parse_smil(smil, smil_url, video_id)
36 switch = smil.find('.//switch')
37 if switch is not None:
38 info['duration'] = parse_duration(switch.attrib.get('dur'))