update rss_proxy.py

* testing fixes description
This commit is contained in:
2025-03-05 19:50:26 +03:00
parent e26f64a9e7
commit ec9d229f54

View File

@@ -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)