update rss_proxy.py

* testing fixes description
This commit is contained in:
2025-03-05 20:06:03 +03:00
parent 5bd08d5803
commit 2828413412

View File

@@ -93,11 +93,11 @@ def init_proxy(app):
# 🔹 Теперь нормализуем весь item ПОСЛЕ замены guid
normalize_xml_texts(item)
item_str = ET.tostring(item, encoding="unicode")
item_str = html.unescape(item_str)
title = item.find("title")
title.text = normalize_text(title.text)
title.text = re.sub(r'&#\d+;', '', title.text)
item_str = ET.tostring(item, encoding="unicode")
item_str = html.unescape(item_str)
rdb.setex(cache_key, CACHE_TTL, item_str)
new_items.append(item_str)