From a8aed014dbbfed67ef56fdda6219e7f17922f383 Mon Sep 17 00:00:00 2001 From: Jan Tuomi Date: Mon, 11 Sep 2023 09:51:05 +0300 Subject: Improvements all around --- plugins/FeedSourcePlugin.py | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) (limited to 'plugins/FeedSourcePlugin.py') diff --git a/plugins/FeedSourcePlugin.py b/plugins/FeedSourcePlugin.py index fd27081..9eba538 100644 --- a/plugins/FeedSourcePlugin.py +++ b/plugins/FeedSourcePlugin.py @@ -2,7 +2,7 @@ import feedparser # type: ignore import time from datetime import datetime, timezone from typing import Any -from app.Item import Item, ItemEnclosure +from app.Item import Item, ItemEnclosure, ItemGUID from app.PluginInterface import Params, PluginInterface from app.utils import ItemDict, get_config @@ -56,17 +56,18 @@ class Plugin(PluginInterface): else datetime_1970 ) + link: str = d["link"] # type: ignore result_items.append( Item( title=d.get("title", None), # type: ignore - link=d["link"], # type: ignore + link=link, description=d.get("description", None), # type: ignore author=d.get("author", None), # type: ignore pub_date=published_datetime, category=d.get("category", None), # type: ignore comments=d.get("comments"), # type: ignore enclosures=item_enclosures, - guid=d["link"], # type: ignore + guid=ItemGUID(link, is_perma_link=True), ) ) -- cgit v1.3