+ subtitles = {}
+ for caption_url in video_element.findall('ClosedCaptioningURIs/URL'):
+ if not caption_url.text:
+ continue
+ ext = determine_ext(caption_url.text, 'ttml')
+ subtitles.setdefault('en', []).append({
+ 'url': caption_url.text,
+ 'ext': 'ttml' if ext == 'xml' else ext,
+ })
+