aboutsummaryrefslogtreecommitdiffstats
path: root/news_feed.py
diff options
context:
space:
mode:
authorPinapelz <yukais@pinapelz.com>2025-04-17 15:31:37 -0700
committerPinapelz <yukais@pinapelz.com>2025-04-17 15:31:37 -0700
commita87715649b4fdfbd549aad493fb262f91f563325 (patch)
treeceb6179c9080f219451bb1008ec729d4e3b713e8 /news_feed.py
parentead6f998b47ff9e9f69ab636a995cbb30acdb775 (diff)
add MUSIC DIVER support
Diffstat (limited to 'news_feed.py')
-rw-r--r--news_feed.py6
1 files changed, 6 insertions, 0 deletions
diff --git a/news_feed.py b/news_feed.py
index 0689abf..0854503 100644
--- a/news_feed.py
+++ b/news_feed.py
@@ -28,6 +28,7 @@ import sega.chuni_intl as chuni_intl
import sega.maimaidx_jp as maimaidx_jp
import sega.maimaidx_intl as maimaidx_intl
import sega.ongeki_jp as ongeki_jp
+import taito.music_diver as music_diver
import constants
import translate
@@ -107,6 +108,11 @@ def get_news(news_url: str, version=None) -> list:
if version == constants.ONGEKI_VERSION.REFRESH:
news_posts = sorted(ongeki_jp.parse_ongeki_refresh_news_site(site_data), key=lambda x: x['timestamp'], reverse=True)
news_posts = translate.add_translate_text_to_en(news_posts)
+
+ elif news_url == constants.MUSIC_DIVER_NEWS:
+ api_data = download_site_as_html(news_url)
+ news_posts = sorted(music_diver.parse_music_diver_news_json(api_data), key=lambda x: x['timestamp'], reverse=True)
+
else:
news_posts = []
return news_posts
send patches to the email below
yukais@pinapelz.com
include the subject [PATCH repo_name]
pinapelz.com
homepage