Skip to content

A feature-rich command-line audio/video downloader

Bugfix for 59e92b1f1833440bb2190f847eb735cf0f90bc85

Simon Sawicki77bff23ee975
diff --git a/yt_dlp/networking/_urllib.py b/yt_dlp/networking/_urllib.py
index 5a804d99b4..b3e705b844 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):