- xml_link, u'video ID')
-
- xml_config = self._download_webpage(
- xml_link, title, u'Downloading XML config')
- config = xml.etree.ElementTree.fromstring(xml_config.encode('utf-8'))
- info_json = self._search_regex(
- r'(?sm)<format\.json>(.*?)</format\.json>',
- xml_config, u'JSON information')
+ xml_link, 'video ID')
+
+ config = self._download_xml(
+ xml_link, title, 'Downloading XML config')
+ info_json = config.find('format.json').text