feat: Link items to articles by title and set unique_id
This commit is contained in:
parent
58970bc8ef
commit
870ab7b6fc
|
@ -13,7 +13,14 @@ def modify_feed(context, feed):
|
||||||
articles[article.title] = article
|
articles[article.title] = article
|
||||||
|
|
||||||
for item in feed.items:
|
for item in feed.items:
|
||||||
pass
|
article = articles.get(item.title)
|
||||||
|
if not article:
|
||||||
|
raise Exception(f"Article not found for title: {item.title}")
|
||||||
|
|
||||||
|
if not hasattr(article, 'guid') or not article.guid:
|
||||||
|
raise Exception(f"Article '{article.title}' is missing a guid.")
|
||||||
|
|
||||||
|
item.unique_id = article.guid
|
||||||
|
|
||||||
|
|
||||||
def register():
|
def register():
|
||||||
|
|
Loading…
Reference in New Issue
Block a user