From 77bff23ee97565bab2e0d75b893a21bf7983219a Mon Sep 17 00:00:00 2001 From: Simon Sawicki Date: Sat, 2 Sep 2023 15:18:04 +0200 Subject: [PATCH] Bugfix for 59e92b1f1833440bb2190f847eb735cf0f90bc85 Closes #8012 Authored by: Grub4K --- yt_dlp/networking/_urllib.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/yt_dlp/networking/_urllib.py b/yt_dlp/networking/_urllib.py index 5a804d99b..b3e705b84 100644 --- a/yt_dlp/networking/_urllib.py +++ b/yt_dlp/networking/_urllib.py @@ -156,6 +156,8 @@ class HTTPHandler(urllib.request.AbstractHTTPHandler): def gz(data): # There may be junk added the end of the file # We ignore it by only ever decoding a single gzip payload + if not data: + return data return zlib.decompress(data, wbits=zlib.MAX_WBITS | 16) def http_request(self, req):