aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRemita Amine <remitamine@gmail.com>2020-02-10 09:42:50 +0100
committerRemita Amine <remitamine@gmail.com>2020-02-10 09:43:20 +0100
commitf377edec067a05365824434d0c44c0f22d797190 (patch)
tree9ec4791749a802f236bdbdb504bbd0afae28dabe
parentbfe2b8cf2ac57c6b66def2d5e0fc3fc424c78d75 (diff)
[nytimes] improve format sorting(closes #24010)
-rw-r--r--youtube_dl/extractor/nytimes.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/youtube_dl/extractor/nytimes.py b/youtube_dl/extractor/nytimes.py
index 2bb77ab24..fc78ca56c 100644
--- a/youtube_dl/extractor/nytimes.py
+++ b/youtube_dl/extractor/nytimes.py
@@ -69,10 +69,10 @@ class NYTimesBaseIE(InfoExtractor):
'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', []):