From 0b4f03a56394dee070f6e1723af8ce3a9ce44bfb Mon Sep 17 00:00:00 2001 From: Remita Amine Date: Thu, 28 Jan 2021 16:22:24 +0100 Subject: [PATCH] [youtube] improve DASH formats file size extraction --- youtube_dl/extractor/youtube.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/youtube_dl/extractor/youtube.py b/youtube_dl/extractor/youtube.py index f57099f8c..b254ceced 100644 --- a/youtube_dl/extractor/youtube.py +++ b/youtube_dl/extractor/youtube.py @@ -2370,7 +2370,7 @@ class YoutubeIE(YoutubeBaseInfoExtractor): mpd_url, video_id, fatal=dash_mpd_fatal, formats_dict=self._formats): if not df.get('filesize'): - df['filesize'] = _extract_filesize(df['url']) + df['filesize'] = _extract_filesize(df.get('fragment_base_url') or df['url']) # Do not overwrite DASH format found in some previous DASH manifest if df['format_id'] not in dash_formats: dash_formats[df['format_id']] = df