guid for tracked articles

This commit is contained in:
Corban-Lee Jones 2024-06-11 01:00:12 +01:00
parent 3c1aebc8c7
commit 15cfd66b69

View File

@ -30,6 +30,7 @@ dumps = lambda _dict: json.dumps(_dict, indent=8)
class Article:
"""Represents a news article, or entry from an RSS feed."""
guid: str
title: str | None
description: str | None
url: str | None
@ -58,6 +59,7 @@ class Article:
published = datetime(*entry.published_parsed[0:-2]) if published_parsed else None
return cls(
guid=entry["guid"]
title=entry.get("title"),
description=entry.get("description"),
url=entry.get("link"),