Update rss_proxy.py
* remove guid rewrite
This commit is contained in:
@@ -78,10 +78,6 @@ def init_proxy(app):
|
||||
new_items = []
|
||||
|
||||
for item in items:
|
||||
guid = item.find("guid")
|
||||
if guid is None or not guid.text:
|
||||
continue
|
||||
|
||||
cache_key = f"rss:item:{guid.text}"
|
||||
cached_item = rdb.get(cache_key)
|
||||
|
||||
@@ -93,12 +89,6 @@ def init_proxy(app):
|
||||
cached_items.append(cached_item.decode())
|
||||
else:
|
||||
description = item.find("description")
|
||||
if description is not None:
|
||||
new_guid = extract_viewtopic_link(description.text)
|
||||
if new_guid:
|
||||
print(f"Заменяю GUID: {guid.text} → {new_guid}")
|
||||
guid.attrib.clear()
|
||||
guid.text = new_guid
|
||||
|
||||
normalize_xml_texts(item)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user