From 966242d03f84a7f7f14cdb294eca225f0f8383bc Mon Sep 17 00:00:00 2001 From: projectmoon Date: Sat, 30 Nov 2024 20:57:21 +0100 Subject: [PATCH] Gemini: do not correct URLs when redirecting --- gemini.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/gemini.py b/gemini.py index 61f633a..174ded8 100644 --- a/gemini.py +++ b/gemini.py @@ -64,7 +64,7 @@ def fetch(gemini_url: str, correct_urls: bool=False, prev_url: Optional[str]=Non if redirects > 5: return f"Too many redirects (ended at {gemini_url})" - if correct_urls: + if correct_urls and not prev_url: corrected_url = correct_url(gemini_url) if corrected_url != gemini_url: print(f"[Gemini] URL '{gemini_url}' corrected to '{corrected_url}'")