update rss_proxy.py
* testing fixes description
This commit is contained in:
@@ -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)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user