update rss_proxy.py
* testing fixes description
This commit is contained in:
@@ -93,11 +93,11 @@ def init_proxy(app):
|
|||||||
# 🔹 Теперь нормализуем весь item ПОСЛЕ замены guid
|
# 🔹 Теперь нормализуем весь item ПОСЛЕ замены guid
|
||||||
normalize_xml_texts(item)
|
normalize_xml_texts(item)
|
||||||
|
|
||||||
item_str = ET.tostring(item, encoding="unicode")
|
|
||||||
item_str = html.unescape(item_str)
|
|
||||||
title = item.find("title")
|
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)
|
rdb.setex(cache_key, CACHE_TTL, item_str)
|
||||||
new_items.append(item_str)
|
new_items.append(item_str)
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user