- title = xpath_text(tree, './title')
- if title:
- title = title.strip()
-
- thumbnail = xpath_text(tree, './image')
- duration = float_or_none(xpath_text(tree, './duration'))
+ title = xpath_text(config, './title', 'title', fatal=True).strip()
+ video_id = xpath_text(config, './mediaid', default=video_id)
+ thumbnail = xpath_text(config, ['./image', './thumb'])
+ duration = float_or_none(xpath_text(config, './duration'))