aboutsummaryrefslogtreecommitdiffstats
path: root/news_feed.py
diff options
context:
space:
mode:
authorPinapelz <yukais@pinapelz.com>2025-04-28 10:23:29 -0700
committerPinapelz <yukais@pinapelz.com>2025-04-28 10:23:29 -0700
commit638c964b7dba51b0f86c4d1f562a77e2cdb49437 (patch)
tree9bedc2b587439051d362089e4ec05939a0ccc32d /news_feed.py
parent4852c740b0e967429f61228511af18ea25a77c12 (diff)
add support for scraping polaris chord
Diffstat (limited to 'news_feed.py')
-rw-r--r--news_feed.py7
1 files changed, 7 insertions, 0 deletions
diff --git a/news_feed.py b/news_feed.py
index d78c78c..4896322 100644
--- a/news_feed.py
+++ b/news_feed.py
@@ -25,6 +25,7 @@ import bemani.sdvx as sound_voltex
import bemani.iidx as iidx
import bemani.ddr as ddr
import sega.chuni_jp as chunithm_jp
+import bemani.polaris_chord as polaris_chord
import sega.chuni_intl as chuni_intl
import sega.maimaidx_jp as maimaidx_jp
import sega.maimaidx_intl as maimaidx_intl
@@ -60,6 +61,12 @@ def get_news(news_url: str, version=None) -> list:
news_posts = sorted(iidx.parse_pinky_crush_news_site(site_data), key=lambda x: x['timestamp'], reverse=True)
news_posts = translate.add_translate_text_to_en(news_posts, iidx.KEY_TERMS_TL)
+ elif news_url == constants.POLARIS_CHORD_NEWS_SITE:
+ scraper = SiteScraper(headless=True)
+ site_data = scraper.get_page_source(news_url)
+ news_posts = sorted(polaris_chord.parse_polaris_chord_news_site(site_data), key=lambda x: x['timestamp'], reverse=True)
+ news_posts = translate.add_translate_text_to_en(news_posts, iidx.KEY_TERMS_TL)
+
elif news_url == constants.EAMUSE_APP_FEED:
scraper = SiteScraper(headless=True)
site_data = scraper.get_page_source(news_url+"/?uuid_to="+version)
send patches to the email below
yukais@pinapelz.com
include the subject [PATCH repo_name]
pinapelz.com
homepage