diff options
| -rw-r--r-- | constants.py | 7 | ||||
| -rw-r--r-- | generate.py | 2 | ||||
| -rw-r--r-- | news_feed.py | 4 |
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() |
