From ec9d229f54c36cf98f41887d550b46b122b69c85 Mon Sep 17 00:00:00 2001 From: bacon Date: Wed, 5 Mar 2025 19:50:26 +0300 Subject: [PATCH] update rss_proxy.py * testing fixes description --- proxy/rss_proxy.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/proxy/rss_proxy.py b/proxy/rss_proxy.py index 7b1a283..47615e4 100755 --- a/proxy/rss_proxy.py +++ b/proxy/rss_proxy.py @@ -78,6 +78,7 @@ def init_proxy(app): cache_key = f"rss:item:{guid.text}" cached_item = rdb.get(cache_key) + if cached_item: cached_items.append(cached_item.decode()) else: @@ -94,6 +95,9 @@ def init_proxy(app): item_str = ET.tostring(item, encoding="unicode") item_str = html.unescape(item_str) + title = item.find("title") + + title.text = normalize_text(title.text) rdb.setex(cache_key, CACHE_TTL, item_str) new_items.append(item_str)