update rss_proxy.py

* testing fixes description
This commit is contained in:
2025-03-05 19:43:58 +03:00
parent 0e4abbc44b
commit e26f64a9e7

View File

@@ -53,7 +53,7 @@ def init_proxy(app):
r = requests.get(url, timeout=10, proxies=proxies)
xml_data = r.text
xml_data = xml_data.replace("&", "&")
# xml_data = xml_data.replace("&", "&")
_encoding = xml_data.split('encoding="')[1].split('"')[0]
if '<?xml version="1.0" encoding="' in xml_data:
xml_data = xml_data.replace(
@@ -93,6 +93,7 @@ def init_proxy(app):
normalize_xml_texts(item)
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)