+ doc = xml.etree.ElementTree.fromstring(info_page.encode('utf-8'))
+ default_thumb = doc.find('./channel/image/url').text
+
+ media_namespace = {'media': 'http://search.yahoo.com/mrss/'}
+ parts = [{
+ 'title': video_doc.find('title').text,
+ 'ext': 'flv',
+ 'id': video_doc.find('guid').text.rpartition(':')[2],
+ # Videos are actually flv not mp4
+ 'url': self._get_video_url(video_doc.find('media:group/media:content', media_namespace).attrib['url'], video_id),
+ # The thumbnail may not be defined, it would be ''
+ 'thumbnail': video_doc.find('media:group/media:thumbnail', media_namespace).attrib['url'] or default_thumb,
+ 'description': video_doc.find('description').text,
+ } for video_doc in doc.findall('./channel/item')]
+ return parts
+
+ def _get_video_url(self, mediagen_url, video_id):
+ if 'acceptMethods' not in mediagen_url:
+ mediagen_url += '&acceptMethods=fms'
+ links_webpage = self._download_webpage(mediagen_url,