From 05c4fc7cc2f488151b055b34e6aa169e8f567ce4 Mon Sep 17 00:00:00 2001 From: xuyanling Date: Thu, 11 Jan 2024 22:55:47 +0800 Subject: [PATCH] =?UTF-8?q?fix(refreshrss):=20PT=20RSS=E4=B8=8B=E8=BD=BD?= =?UTF-8?q?=E5=A4=B1=E8=B4=A5?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/rsschecker.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/app/rsschecker.py b/app/rsschecker.py index e746b996..da717c20 100644 --- a/app/rsschecker.py +++ b/app/rsschecker.py @@ -1,6 +1,7 @@ import re import json import time +import html import traceback import jsonpath @@ -491,9 +492,9 @@ def __parse_userrss_result(self, taskinfo): for key, attr in rss_parser_format.get("item", {}).items(): item_html = etree.tostring(item, encoding='unicode') if key == "enclosure": - enclosure_matches = re.findall(r'magnet:\?xt=urn:btih:(\w+)', item_html) + enclosure_matches = re.findall(r'= 1: - value = f"magnet:?xt=urn:btih:{enclosure_matches[0]}" + value = html.unescape(enclosure_matches[0]) rss_item.update({key: value}) else: continue