A feature-rich command-line audio/video downloader
[downloader/fragment] Don't fail if the 'Content-Length' header is missing
Jaime Marquínez Ferrándiz3c91e41614a0
diff --git a/youtube_dl/downloader/fragment.py b/youtube_dl/downloader/fragment.pyindex 5a64b29eef..3da554622e 100644--- a/youtube_dl/downloader/fragment.py+++ b/youtube_dl/downloader/fragment.py@@ -66,7 +66,7 @@ class FragmentFD(FileDownloader):if s['status'] not in ('downloading', 'finished'):return- frag_total_bytes = s.get('total_bytes', 0)+ frag_total_bytes = s.get('total_bytes') or 0if s['status'] == 'finished':state['downloaded_bytes'] += frag_total_bytesstate['frag_index'] += 1