def youtube_video_transcript_name(youtube_text_api):
 utf8_parser = etree.XMLParser(encoding='utf-8')
 transcripts_param = {'type': 'list', 'v': youtube_text_api['params']['v']}
 lang = youtube_text_api['params']['lang']
 youtube_response = requests.get(('http://' + youtube_text_api['url']), params=transcripts_param)
 if ((youtube_response.status_code == 200) and youtube_response.text):
  youtube_data = etree.fromstring(youtube_response.content, parser=utf8_parser)
  for element in youtube_data:
   if ((element.tag == 'track') and (element.get('lang_code', '') == lang)):
    return element.get('name')
 return None

def youtube_video_transcript_name ( youtube_text_api ) : utf8_parser = etree . XMLParser ( encoding = 'utf-8' ) transcripts_param = { 'type' : 'list' , 'v' : youtube_text_api [ 'params' ] [ 'v' ] } lang = youtube_text_api [ 'params' ] [ 'lang' ] youtube_response = requests . get ( ( 'http://' + youtube_text_api [ 'url' ] ) , params = transcripts_param ) if ( ( youtube_response . status_code == 200 ) and youtube_response . text ) : youtube_data = etree . fromstring ( youtube_response . content , parser = utf8_parser ) for element in youtube_data : if ( ( element . tag == 'track' ) and ( element . get ( 'lang_code' , '' ) == lang ) ) : return element . get ( 'name' ) return None
get the transcript name from available transcripts of video with respect to language from youtube server .