Quality note for niconico - at least notify whether you'll get low or src

This commit is contained in:
chaoskagami 2015-06-14 00:18:40 -04:00
parent a617b10075
commit 976b03c56b

View File

@ -184,6 +184,11 @@ def _real_extract(self, url):
extension = determine_ext(video_real_url) extension = determine_ext(video_real_url)
video_format = extension.upper() video_format = extension.upper()
if video_real_url.endswith('low'):
format_note = 'low'
else:
format_note = 'src'
thumbnail = ( thumbnail = (
xpath_text(video_info, './/thumbnail_url') or xpath_text(video_info, './/thumbnail_url') or
self._html_search_meta('image', webpage, 'thumbnail', default=None) or self._html_search_meta('image', webpage, 'thumbnail', default=None) or
@ -242,6 +247,7 @@ def _real_extract(self, url):
'title': title, 'title': title,
'ext': extension, 'ext': extension,
'format': video_format, 'format': video_format,
'format_note' : format_note,
'thumbnail': thumbnail, 'thumbnail': thumbnail,
'description': description, 'description': description,
'uploader': uploader, 'uploader': uploader,