diff options
| author | Pinapelz <yukais@pinapelz.com> | 2025-04-22 01:23:18 -0700 |
|---|---|---|
| committer | Pinapelz <yukais@pinapelz.com> | 2025-04-22 01:23:18 -0700 |
| commit | 371ce5aba3ba8be9e00f93d3a4d36abff3e5e180 (patch) | |
| tree | 6bb3b1503b2b6a6b32d63837e67eba3ea28846f2 /news_feed.py | |
| parent | d88ea267b780aebc077b43dcf56a0141c3abe6d4 (diff) | |
add wac_plus community
Diffstat (limited to 'news_feed.py')
| -rw-r--r-- | news_feed.py | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/news_feed.py b/news_feed.py index c9f5131..a5a1ade 100644 --- a/news_feed.py +++ b/news_feed.py @@ -30,6 +30,8 @@ import sega.maimaidx_intl as maimaidx_intl import sega.ongeki_jp as ongeki_jp import taito.music_diver as music_diver import bandai_namco.taiko as taiko +import community.disc as disc +import community.wacca_plus.wacca_plus as wac_plus import constants import translate @@ -135,6 +137,12 @@ def get_news(news_url: str, version=None) -> list: site_data = download_site_as_html(news_url) news_posts = sorted(taiko.parse_taiko_blog_site(site_data), key=lambda x: x['timestamp'], reverse=True) + elif news_url == constants.WACCA_PLUS_MAGIC_STRING: + if not wac_plus.check_is_generation_possible(): + news_posts = [] + else: + messages = disc.fetch_messages(constants.WACCA_PLUS_MAGIC_STRING) + news_posts = sorted(wac_plus.parse_announcement_messages(messages), key=lambda x: x['timestamp'], reverse=True) else: news_posts = [] return news_posts |
