From 1c421404ef02b058e93bf9d4f77b5d08dc16cfec Mon Sep 17 00:00:00 2001 From: Tim Van Baak Date: Sat, 1 Jul 2023 20:37:24 +0000 Subject: [PATCH] Usability improvements to intake-hackernews --- intake-hackernews/intake_hackernews/core.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/intake-hackernews/intake_hackernews/core.py b/intake-hackernews/intake_hackernews/core.py index 13bbe00..9d36244 100644 --- a/intake-hackernews/intake_hackernews/core.py +++ b/intake-hackernews/intake_hackernews/core.py @@ -57,8 +57,9 @@ def main(): if story_time := story.get("time"): item["time"] = int(story_time) + item["body"] = f'

Link to comments

' if story_text := story.get("text"): - item["body"] = story_text + item["body"] = story_text + item["body"] if story_url := story.get("url"): item["link"] = story_url @@ -66,4 +67,6 @@ def main(): if story_title := story.get("title"): item["title"] = story_title + item["ttl"] = 60 * 60 * 72 # 72 hours + print(json.dumps(item))