Skip to content

Commit

Permalink
[nytimes] improve format sorting(closes #24010)
Browse files Browse the repository at this point in the history
  • Loading branch information
remitamine authored and bbepis committed Feb 27, 2020
1 parent abfd514 commit d4c5346
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions youtube_dl/extractor/nytimes.py
Original file line number Diff line number Diff line change
Expand Up @@ -69,10 +69,10 @@ def get_file_size(file_size):
'width': int_or_none(video.get('width')),
'height': int_or_none(video.get('height')),
'filesize': get_file_size(video.get('file_size') or video.get('fileSize')),
'tbr': int_or_none(video.get('bitrate'), 1000),
'tbr': int_or_none(video.get('bitrate'), 1000) or None,
'ext': ext,
})
self._sort_formats(formats)
self._sort_formats(formats, ('height', 'width', 'filesize', 'tbr', 'fps', 'format_id'))

thumbnails = []
for image in video_data.get('images', []):
Expand Down

0 comments on commit d4c5346

Please sign in to comment.