Skip to content

Commit

Permalink
niconico metadata fix
Browse files Browse the repository at this point in the history
  • Loading branch information
no1d committed Jun 21, 2021
1 parent 86e131a commit e493896
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions youtube_dl/extractor/niconico.py
Original file line number Diff line number Diff line change
Expand Up @@ -257,14 +257,14 @@ def yesno(boolean):
}
}).encode())

resolution = video_quality.get('resolution', {})
resolution = video_quality['metadata'].get('resolution', {})

return {
'url': session_response['data']['session']['content_uri'],
'format_id': format_id,
'ext': 'mp4', # Session API are used in HTML5, which always serves mp4
'abr': float_or_none(audio_quality.get('bitrate'), 1000),
'vbr': float_or_none(video_quality.get('bitrate'), 1000),
'abr': float_or_none(audio_quality['metadata'].get('bitrate'), 1000),
'vbr': float_or_none(video_quality['metadata'].get('bitrate'), 1000),
'height': resolution.get('height'),
'width': resolution.get('width'),
}
Expand Down

0 comments on commit e493896

Please sign in to comment.