mirror of
https://github.com/l1ving/youtube-dl
synced 2024-12-22 12:52:58 +08:00
[niconico] Simplify format info
This commit is contained in:
parent
44773ad125
commit
67d95f177c
@ -182,12 +182,6 @@ class NiconicoIE(InfoExtractor):
|
|||||||
extension = xpath_text(video_info, './/movie_type')
|
extension = xpath_text(video_info, './/movie_type')
|
||||||
if not extension:
|
if not extension:
|
||||||
extension = determine_ext(video_real_url)
|
extension = determine_ext(video_real_url)
|
||||||
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
|
||||||
@ -246,8 +240,7 @@ class NiconicoIE(InfoExtractor):
|
|||||||
'url': video_real_url,
|
'url': video_real_url,
|
||||||
'title': title,
|
'title': title,
|
||||||
'ext': extension,
|
'ext': extension,
|
||||||
'format': video_format,
|
'format_id': 'economy' if video_real_url.endswith('low') else 'normal',
|
||||||
'format_note' : format_note,
|
|
||||||
'thumbnail': thumbnail,
|
'thumbnail': thumbnail,
|
||||||
'description': description,
|
'description': description,
|
||||||
'uploader': uploader,
|
'uploader': uploader,
|
||||||
|
Loading…
Reference in New Issue
Block a user