From b0c52d79d81de4e939d81c328ad6e447b9b67fbe Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Daniel=20Sk=C3=BDpala?= Date: Mon, 6 Nov 2023 11:58:05 +0100 Subject: [PATCH] News: Commit ALL changed files --- hrochobot/utils/json_templates.py | 1 + hrochobot/utils/ksp_utils.py | 4 ++++ 2 files changed, 5 insertions(+) diff --git a/hrochobot/utils/json_templates.py b/hrochobot/utils/json_templates.py index ced3368..e7ce0e5 100644 --- a/hrochobot/utils/json_templates.py +++ b/hrochobot/utils/json_templates.py @@ -1,4 +1,5 @@ TEMPLATES = { 'roles.json' : '{"secret_roles": {}}', 'messages.json' : '{}', + 'news.json' : '{}', } diff --git a/hrochobot/utils/ksp_utils.py b/hrochobot/utils/ksp_utils.py index 624feca..08c73df 100644 --- a/hrochobot/utils/ksp_utils.py +++ b/hrochobot/utils/ksp_utils.py @@ -1,3 +1,4 @@ +import feedparser from typing import List, Tuple, Optional from datetime import datetime import requests @@ -33,3 +34,6 @@ def active_deadlines() -> List[Tuple[str, datetime]]: break return deadlines + +async def ksp_feed() -> feedparser.util.FeedParserDict: + return feedparser.parse(f"{KSP_URL}/ksp.feed")