#NEWLINE# def _real_extract( self , url ) : #NEWLINE# #INDENT# mobj = re . match ( self . _VALID_URL , url ) #NEWLINE# video_id = mobj . group ( 'id' ) #NEWLINE# smil_url = ( 'http://videolectures.net/%s/video/1/smil.xml' % video_id ) #NEWLINE# smil = self . _download_xml ( smil_url , video_id ) #NEWLINE# title = find_xpath_attr ( smil , './/meta' , 'name' , 'title' ) . attrib [ 'content' ] #NEWLINE# description_el = find_xpath_attr ( smil , './/meta' , 'name' , 'abstract' ) #NEWLINE# description = ( None if ( description_el is None ) else description_el . attrib [ 'content' ] ) #NEWLINE# upload_date = unified_strdate ( find_xpath_attr ( smil , './/meta' , 'name' , 'date' ) . attrib [ 'content' ] ) #NEWLINE# switch = smil . find ( './/switch' ) #NEWLINE# duration = parse_duration ( switch . attrib . get ( 'dur' ) ) #NEWLINE# thumbnail_el = find_xpath_attr ( switch , './image' , 'type' , 'thumbnail' ) #NEWLINE# thumbnail = ( None if ( thumbnail_el is None ) else thumbnail_el . attrib . get ( 'src' ) ) #NEWLINE# formats = [ { #NEWLINE# #INDENT# 'url' : v . attrib [ 'src' ] , #NEWLINE# 'width' : int_or_none ( v . attrib . get ( 'width' ) ) , #NEWLINE# 'height' : int_or_none ( v . attrib . get ( 'height' ) ) , #NEWLINE# 'filesize' : int_or_none ( v . attrib . get ( 'size' ) ) , #NEWLINE# 'tbr' : ( int_or_none ( v . attrib . get ( 'systemBitrate' ) ) / 1000.0 ) , #NEWLINE# 'ext' : v . attrib . get ( 'ext' ) , #NEWLINE# #UNINDENT# } for v in switch . findall ( './video' ) if ( v . attrib . get ( 'proto' ) == 'http' ) ] #NEWLINE# return { #NEWLINE# #INDENT# 'id' : video_id , #NEWLINE# 'title' : title , #NEWLINE# 'description' : description , #NEWLINE# 'upload_date' : upload_date , #NEWLINE# 'duration' : duration , #NEWLINE# 'thumbnail' : thumbnail , #NEWLINE# 'formats' : formats , #NEWLINE# #UNINDENT# }