|
@ -11,6 +11,7 @@ from ..utils import ( |
|
|
ExtractorError, |
|
|
ExtractorError, |
|
|
find_xpath_attr, |
|
|
find_xpath_attr, |
|
|
fix_xml_ampersands, |
|
|
fix_xml_ampersands, |
|
|
|
|
|
float_or_none, |
|
|
HEADRequest, |
|
|
HEADRequest, |
|
|
sanitized_Request, |
|
|
sanitized_Request, |
|
|
unescapeHTML, |
|
|
unescapeHTML, |
|
@ -158,6 +159,9 @@ class MTVServicesInfoExtractor(InfoExtractor): |
|
|
if mtvn_id_node is not None: |
|
|
if mtvn_id_node is not None: |
|
|
mtvn_id = mtvn_id_node.text |
|
|
mtvn_id = mtvn_id_node.text |
|
|
|
|
|
|
|
|
|
|
|
content_el = find_xpath_attr(itemdoc, self._xpath_ns('.//content', 'http://search.yahoo.com/mrss/'), 'duration') |
|
|
|
|
|
duration = float_or_none(content_el.attrib.get('duration')) if content_el is not None else None |
|
|
|
|
|
|
|
|
return { |
|
|
return { |
|
|
'title': title, |
|
|
'title': title, |
|
|
'formats': self._extract_video_formats(mediagen_doc, mtvn_id), |
|
|
'formats': self._extract_video_formats(mediagen_doc, mtvn_id), |
|
@ -165,6 +169,7 @@ class MTVServicesInfoExtractor(InfoExtractor): |
|
|
'id': video_id, |
|
|
'id': video_id, |
|
|
'thumbnail': self._get_thumbnail_url(uri, itemdoc), |
|
|
'thumbnail': self._get_thumbnail_url(uri, itemdoc), |
|
|
'description': description, |
|
|
'description': description, |
|
|
|
|
|
'duration': duration, |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
def _get_feed_query(self, uri): |
|
|
def _get_feed_query(self, uri): |
|
|