aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPinapelz <yukais@pinapelz.com>2025-04-14 11:17:36 -0700
committerPinapelz <yukais@pinapelz.com>2025-04-14 11:17:36 -0700
commitd93b2060a22ea82f8028df80d4549abee2611f98 (patch)
treea94118d47480572d51c60662bc0029a10fcc3eb3
parentfde865a42f1d2623a57bdac1cc1f81ffbaa6578d (diff)
set headline to always None on sega games
content contains the same info
-rw-r--r--sega/chuni_jp.py6
-rw-r--r--sega/maimaidx_jp.py7
2 files changed, 3 insertions, 10 deletions
diff --git a/sega/chuni_jp.py b/sega/chuni_jp.py
index 20743ed..bdbe800 100644
--- a/sega/chuni_jp.py
+++ b/sega/chuni_jp.py
@@ -39,13 +39,7 @@ def parse_chuni_jp_verse_news_site(html: str):
headline = None
content_text = ""
if main_content:
- img_tag = main_content.find("img")
- if img_tag and img_tag.get("alt"):
- headline = img_tag.get("alt")
- else:
- headline = main_content.get_text(separator=" ", strip=True)
content_text = main_content.get_text(separator=" ", strip=True)
- news_dict["headline"] = headline
news_dict["content"] = content_text
images = {"image": None, "link": None}
if main_content:
diff --git a/sega/maimaidx_jp.py b/sega/maimaidx_jp.py
index e098b37..90530f0 100644
--- a/sega/maimaidx_jp.py
+++ b/sega/maimaidx_jp.py
@@ -27,15 +27,14 @@ def parse_maimaidx_jp_prism_plus_news_site(html: str):
dt = None
timestamp = 0
- headline_tag = box.select_one(".newsLink")
- headline = headline_tag.get_text(strip=True) if headline_tag else None
- content = box.get_text(separator="\n", strip=True)
+ content_tag = box.select_one(".newsLink")
+ content = content_tag.get_text(strip=True) if content_tag else None
news_items.append({
"date": raw_date,
"identifier": "MAIMAIDX_JPN_PRISM_PLUS",
"type": None,
"timestamp": timestamp,
- "headline": headline,
+ "headline": None,
"content": content,
"url": url,
"images": [{
send patches to the email below
yukais@pinapelz.com
include the subject [PATCH repo_name]
pinapelz.com
homepage