- xml_config = self._download_webpage(xml_link, title,
- 'Downloading XML config')
- info = re.search(r'<format\.json>(.*?)</format\.json>',
- xml_config, re.MULTILINE|re.DOTALL).group(1)
- info = json.loads(info)['versions'][0]
+ 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')
+ info = json.loads(info_json)['versions'][0]