From 98b4954065dbad26b19b7066a16b6876e829b8e2 Mon Sep 17 00:00:00 2001 From: sunwoo1524 Date: Sun, 3 Nov 2024 02:08:43 +0900 Subject: [PATCH] Fix: f-string syntax error in feed_generator.py --- utils/feed_generator.py | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/utils/feed_generator.py b/utils/feed_generator.py index 34571f3..4d36b15 100644 --- a/utils/feed_generator.py +++ b/utils/feed_generator.py @@ -59,14 +59,16 @@ def generate_feed_of_user(user_handle: str) -> str | int: # get media of status for media in status["media_attachments"]: + media_url = media["url"] + media_description = media["description"] if media["type"] == "image": - content += f"" + content += f"{media_description if not media_description is None else " elif media["type"] == "video" or media["type"] == "gifv": - content += f"" + content += f"" elif media["type"] == "audio": - content += f"{f"{media["description"]}" if not media["description"] is None else ""}" + content += f"{f'{media_description}' if not media_description is None else ''}" else: - content += f"{media["description"] if not media["description"] is None else media["url"]}" + content += f"{media_description if not media_description is None else media_url}" status_items.append(rfeed.Item( description=content,