Usability improvements to intake-hackernews
This commit is contained in:
parent
e7e13ebc41
commit
1c421404ef
|
@ -57,8 +57,9 @@ def main():
|
||||||
if story_time := story.get("time"):
|
if story_time := story.get("time"):
|
||||||
item["time"] = int(story_time)
|
item["time"] = int(story_time)
|
||||||
|
|
||||||
|
item["body"] = f'<p><a href="https://news.ycombinator.com/item?id={story["id"]}">Link to comments</a></p>'
|
||||||
if story_text := story.get("text"):
|
if story_text := story.get("text"):
|
||||||
item["body"] = story_text
|
item["body"] = story_text + item["body"]
|
||||||
|
|
||||||
if story_url := story.get("url"):
|
if story_url := story.get("url"):
|
||||||
item["link"] = story_url
|
item["link"] = story_url
|
||||||
|
@ -66,4 +67,6 @@ def main():
|
||||||
if story_title := story.get("title"):
|
if story_title := story.get("title"):
|
||||||
item["title"] = story_title
|
item["title"] = story_title
|
||||||
|
|
||||||
|
item["ttl"] = 60 * 60 * 72 # 72 hours
|
||||||
|
|
||||||
print(json.dumps(item))
|
print(json.dumps(item))
|
||||||
|
|
Loading…
Reference in New Issue