- webpage = self._download_webpage(url, video_id)
- video_url = self._html_search_regex(
- r'<div.*?name="div_video".*?flashvars="([^"]+)">',
- webpage, 'video URL')
+ page = self._download_webpage(url, video_id)
+ title = self._html_search_meta('twitter:title', page, 'title')
+ description = self._html_search_meta('twitter:description', page, 'title')
+
+ data = self._download_xml(
+ 'http://www.firstpost.com/getvideoxml-%s.xml' % video_id, video_id,
+ 'Downloading video XML')
+
+ item = data.find('./playlist/item')
+ thumbnail = item.find('./image').text
+
+ formats = [
+ {
+ 'url': details.find('./file').text,
+ 'format_id': details.find('./label').text.strip(),
+ 'width': int(details.find('./width').text.strip()),
+ 'height': int(details.find('./height').text.strip()),
+ } for details in item.findall('./source/file_details') if details.find('./file').text
+ ]