aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPinapelz <yukais@pinapelz.com>2025-04-14 01:37:42 -0700
committerPinapelz <yukais@pinapelz.com>2025-04-14 01:37:42 -0700
commit147c36d207ca74e876b6b4703fd3f57f3ab57e56 (patch)
tree390e870a126623a56d770337b376184fa6776681
parentf5b53cde00aad3cc7dd3618a14fbfb9f622f106f (diff)
seperate CHUNITHM_NEWS to regions INTL and JP
-rw-r--r--constants.py7
-rw-r--r--generate.py2
-rw-r--r--news_feed.py4
3 files changed, 10 insertions, 3 deletions
diff --git a/constants.py b/constants.py
index feb7dc5..7025146 100644
--- a/constants.py
+++ b/constants.py
@@ -6,7 +6,12 @@ EAMUSEMENT_BASE_URL = "https://p.eagate.573.jp"
SOUND_VOLTEX_EXCEED_GEAR_NEWS_SITE ="https://p.eagate.573.jp/game/sdvx/vi/news/index.html"
IIDX_PINKY_CRUSH_NEWS_SITE="https://p.eagate.573.jp/game/2dx/32/info/index.html"
-CHUNITHM_NEWS_SITE="https://info-chunithm.sega.jp/"
+CHUNITHM_JP_NEWS_SITE="https://info-chunithm.sega.jp/"
+MAIMAIDX_NEWS_SITE="https://info-maimai.sega.jp/"
class CHUNITHM_VERSION(Enum):
VERSE = 1
+
+class MAIMAIDX_VERSION(Enum):
+ PRISM = 1
+ PRISM_PLUS = 2
diff --git a/generate.py b/generate.py
index 209e924..106f9bf 100644
--- a/generate.py
+++ b/generate.py
@@ -38,7 +38,7 @@ if __name__ == "__main__":
with open(OUTPUT_DIR+'/sdvx_news.json', 'w') as json_file:
json.dump(attach_news_meta_data(sdvx_news_data), json_file)
- chunithm_jp_news_data = feed.get_news(constants.CHUNITHM_NEWS_SITE, constants.CHUNITHM_VERSION.VERSE)
+ chunithm_jp_news_data = feed.get_news(constants.CHUNITHM_JP_NEWS_SITE, constants.CHUNITHM_VERSION.VERSE)
with open(OUTPUT_DIR+'/chunithm_jp_news.json', 'w') as json_file:
json.dump(attach_news_meta_data(chunithm_jp_news_data), json_file)
diff --git a/news_feed.py b/news_feed.py
index 1a04e6c..8bd1179 100644
--- a/news_feed.py
+++ b/news_feed.py
@@ -30,9 +30,11 @@ def get_news(news_url: str, version=None) -> list:
news_posts = sorted(sound_voltex.parse_exceed_gear_news_site(site_data, constants.EAMUSEMENT_BASE_URL), key=lambda x: x['timestamp'], reverse=True)
elif news_url == constants.IIDX_PINKY_CRUSH_NEWS_SITE:
news_posts = sorted(iidx.parse_pinky_crush_news_site(site_data, constants.EAMUSEMENT_BASE_URL), key=lambda x: x['timestamp'], reverse=True)
- elif news_url == constants.CHUNITHM_NEWS_SITE:
+ elif news_url == constants.CHUNITHM_JP_NEWS_SITE:
if version == constants.CHUNITHM_VERSION.VERSE:
news_posts = sorted(chunithm_jp.parse_chuni_jp_verse_news_site(site_data), key=lambda x: x['timestamp'], reverse=True)
+ elif news_url == constants.MAIMAIDX_NEWS_SITE:
+ pass
else:
news_posts = []
scraper.close()
send patches to the email below
yukais@pinapelz.com
include the subject [PATCH repo_name]
pinapelz.com
homepage