From f5b68439686eec7f5a904574fa9cacf54cec3015 Mon Sep 17 00:00:00 2001 From: irl Date: Thu, 18 Jun 2026 09:41:32 +0100 Subject: [PATCH] fix(snapshots): ignore images with no content-type from server --- src/snapshots/client.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/snapshots/client.py b/src/snapshots/client.py index 4e6dbca..3c1a337 100644 --- a/src/snapshots/client.py +++ b/src/snapshots/client.py @@ -74,6 +74,8 @@ def fetch_url(base: str, url: str) -> str | None: if len(content) > 2_500_000: return None content_type = response.headers.get("Content-Type", "") + if content_type == "": + return None return encode_data_uri(content, content_type) except requests.exceptions.RequestException: return None