From 8fa6d9de391cf851fffc2d7d205b668daaf2a564 Mon Sep 17 00:00:00 2001 From: Robin-PC-X1C Date: Fri, 14 Mar 2025 16:42:41 +0800 Subject: [PATCH] =?UTF-8?q?20250314=20=E4=BF=AE=E6=94=B9rss.py=20=E4=BF=AE?= =?UTF-8?q?=E6=94=B9=E5=8E=9F=E5=9B=A0=EF=BC=9A=E7=AE=A1=E7=90=86=E5=91=98?= =?UTF-8?q?=E5=9C=A8mp=E6=B7=BB=E5=8A=A0=E5=A4=9A=E4=B8=AA=E8=B1=86?= =?UTF-8?q?=E7=93=A3id=E6=97=B6=EF=BC=8C=E4=B8=8D=E5=90=8C=E7=9A=84?= =?UTF-8?q?=E8=B1=86=E7=93=A3=E7=94=A8=E6=88=B7=E8=AE=A2=E9=98=85=E5=86=85?= =?UTF-8?q?=E5=AE=B9=EF=BC=8C=E5=8F=91=E9=80=81=E9=80=9A=E7=9F=A5=E6=97=B6?= =?UTF-8?q?=E7=BB=9F=E4=B8=80=E4=B8=BA=E2=80=9C=E8=B1=86=E7=93=A3=E6=83=B3?= =?UTF-8?q?=E7=9C=8B=E2=80=9D,=E6=97=A0=E6=B3=95=E5=8C=BA=E5=88=86=20?= =?UTF-8?q?=E4=BF=AE=E6=94=B9=E5=90=8E=EF=BC=9A=E5=A2=9E=E5=8A=A0=E8=B1=86?= =?UTF-8?q?=E7=93=A3=E6=98=B5=E7=A7=B0=E8=8E=B7=E5=8F=96=EF=BC=8C=E4=BE=BF?= =?UTF-8?q?=E4=BA=8E=E6=8E=A8=E9=80=81=E8=AE=A2=E9=98=85=E9=80=9A=E7=9F=A5?= =?UTF-8?q?=E6=B6=88=E6=81=AF=E6=97=B6=EF=BC=8C=E5=8C=BA=E5=88=86=E8=B1=86?= =?UTF-8?q?=E7=93=A3=E7=94=A8=E6=88=B7=E5=90=8D=E7=A7=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/helper/rss.py | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/app/helper/rss.py b/app/helper/rss.py index de55162b..999f3a64 100644 --- a/app/helper/rss.py +++ b/app/helper/rss.py @@ -301,6 +301,8 @@ class RssHelper: if pubdate: # 转换为时间 pubdate = StringUtils.get_time(pubdate) + # 获取豆瓣昵称 + nickname = DomUtils.tag_value(item, "dc:createor", default="") # 返回对象 tmp_dict = {'title': title, 'enclosure': enclosure, @@ -308,6 +310,9 @@ class RssHelper: 'description': description, 'link': link, 'pubdate': pubdate} + # 如果豆瓣昵称不为空,返回数据增加豆瓣昵称,供doubansync插件获取 + if nickname: + tmp_dict['nickname'] = nickname ret_array.append(tmp_dict) except Exception as e1: logger.debug(f"解析RSS失败:{str(e1)} - {traceback.format_exc()}")