- video_id = self._html_search_regex(
- r'<mediaid>([^<]+)', configpage, 'video id')
- video_url = self._html_search_regex(
- r'<file>([^<]+)', configpage, 'video URL')
- title = self._html_search_regex(
- r'<title><!\[CDATA\[([^\]]+)', configpage, 'title')
- duration = int_or_none(self._html_search_regex(
- r'<duration>([0-9\.]+)', configpage, 'duration', fatal=False))
+ video_url = xpath_text(config, './file', 'video url', fatal=True)
+ title = xpath_text(config, './title', 'title', fatal=True)
+ thumbnail = xpath_text(config, './image', 'thumbnail')
+ duration = float_or_none(xpath_text(config, './duration', 'duration'))
+ video_id = xpath_text(config, './mediaid', 'video id') or video_id