feeds: fix \u2019 -> ' encoding in feed fields

This commit is contained in:
2024-10-03 02:58:13 +00:00
parent 1a2ef5e660
commit 198f6a1836

View File

@@ -41,7 +41,10 @@ def clean_item(item: dict) -> dict:
# clean up characters for better printability
for k in "title", "site_name", "description":
if k not in item: continue
item[k] = item[k].replace("\u2013", "-")
item[k] = item[k] \
.replace("\u2013", "-") \
.replace("\u2019", "'") \
return item
def try_load_existing_feed(path_: str) -> dict: