From b77c17a9992c0b8d00a512df45ebb0247fe53fec Mon Sep 17 00:00:00 2001 From: jxxghp Date: Wed, 23 Aug 2023 06:55:14 +0800 Subject: [PATCH] =?UTF-8?q?fix=20RSS=E8=AE=A2=E9=98=85=E6=8F=92=E4=BB=B6?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/plugins/rsssubscribe/__init__.py | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/app/plugins/rsssubscribe/__init__.py b/app/plugins/rsssubscribe/__init__.py index 3d8956ec..0b032cde 100644 --- a/app/plugins/rsssubscribe/__init__.py +++ b/app/plugins/rsssubscribe/__init__.py @@ -1,6 +1,5 @@ import datetime import re -import time from pathlib import Path from threading import Lock from typing import Optional, Any, List, Dict, Tuple @@ -559,7 +558,7 @@ class RssSubscribe(_PluginBase): enclosure = result.get("enclosure") link = result.get("link") sise = result.get("sise") - pubdate = result.get("pubdate") + pubdate: datetime.datetime = result.get("pubdate") # 检查是否处理过 if not title or title in [h.get("key") for h in history]: continue @@ -588,7 +587,7 @@ class RssSubscribe(_PluginBase): enclosure=enclosure, page_url=link, size=sise, - pubdate=time.strftime("%Y-%m-%d %H:%M:%S", pubdate) if pubdate else None, + pubdate=pubdate.strftime("%Y-%m-%d %H:%M:%S") if pubdate else None, ) # 过滤种子 if self._filter: