guid for tracked articles
This commit is contained in:
parent
3c1aebc8c7
commit
15cfd66b69
@ -30,6 +30,7 @@ dumps = lambda _dict: json.dumps(_dict, indent=8)
|
|||||||
class Article:
|
class Article:
|
||||||
"""Represents a news article, or entry from an RSS feed."""
|
"""Represents a news article, or entry from an RSS feed."""
|
||||||
|
|
||||||
|
guid: str
|
||||||
title: str | None
|
title: str | None
|
||||||
description: str | None
|
description: str | None
|
||||||
url: str | None
|
url: str | None
|
||||||
@ -58,6 +59,7 @@ class Article:
|
|||||||
published = datetime(*entry.published_parsed[0:-2]) if published_parsed else None
|
published = datetime(*entry.published_parsed[0:-2]) if published_parsed else None
|
||||||
|
|
||||||
return cls(
|
return cls(
|
||||||
|
guid=entry["guid"]
|
||||||
title=entry.get("title"),
|
title=entry.get("title"),
|
||||||
description=entry.get("description"),
|
description=entry.get("description"),
|
||||||
url=entry.get("link"),
|
url=entry.get("link"),
|
||||||
|
Loading…
x
Reference in New Issue
Block a user