aboutsummaryrefslogtreecommitdiffstats
path: root/bemani/ddr.py
diff options
context:
space:
mode:
Diffstat (limited to 'bemani/ddr.py')
-rw-r--r--bemani/ddr.py10
1 files changed, 6 insertions, 4 deletions
diff --git a/bemani/ddr.py b/bemani/ddr.py
index a969434..a4e9f12 100644
--- a/bemani/ddr.py
+++ b/bemani/ddr.py
@@ -25,8 +25,7 @@ def parse_ddr_world_news_site(html: str):
timestamp = int(time.mktime(dt.timetuple()))
except Exception:
date_iso, timestamp = None, None
-
- paras = [p.get_text(strip=True, separator="\n")
+ paras = [p.get_text(strip=True, separator="\n\n")
for p in div.find_all("p", recursive=False)]
if not paras:
for child in div.find_all(recursive=False):
@@ -34,8 +33,11 @@ def parse_ddr_world_news_site(html: str):
if "news_title" in cls or "img_news_center" in cls:
continue
if child.name == "div":
- paras.append(child.get_text(strip=True, separator="\n"))
- content = "\n\n".join(paras) if paras else None
+ paras.append(child.get_text(strip=True, separator="\n\n"))
+
+ content = "\n\n\n".join(paras) if paras else None
+ if content:
+ content = f"\n{content}\n"
images = []
for img in div.select("div.img_news_center img"):
send patches to the email below
yukais@pinapelz.com
include the subject [PATCH repo_name]
pinapelz.com
homepage