From 72d6ede0e69e825a064dd0b3ec467a715281dff0 Mon Sep 17 00:00:00 2001 From: bacon Date: Wed, 5 Mar 2025 10:52:11 +0300 Subject: [PATCH] update rss_proxy.py * fixed broken guid rewrite in las commit --- proxy/rss_proxy.py | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/proxy/rss_proxy.py b/proxy/rss_proxy.py index fc1fd55..852d427 100755 --- a/proxy/rss_proxy.py +++ b/proxy/rss_proxy.py @@ -83,12 +83,12 @@ def init_proxy(app): description = item.find("description") if description is not None: new_guid = extract_viewtopic_link(description.text) - print(new_guid) if new_guid: + print(f"Заменяю GUID: {guid.text} → {new_guid}") guid.attrib.clear() - guid.text = new_guid + guid.text = new_guid # 🔹 Теперь подмена делается ДО нормализации - # Нормализуем весь + # 🔹 Теперь нормализуем весь item ПОСЛЕ замены guid normalize_xml_texts(item) item_str = ET.tostring(item, encoding="unicode") @@ -102,3 +102,4 @@ def init_proxy(app): except Exception as e: return f"Error: {e}", 500 +