aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPinapelz <yukais@pinapelz.com>2025-05-22 22:40:29 -0700
committerPinapelz <yukais@pinapelz.com>2025-05-22 22:40:29 -0700
commit35973b683c97ef9150107f8fd81910958ff7f57d (patch)
tree310302dc1efb61a3b5dff19dfdfd7f3914a986af
parent7e277bad5bd730947bb4b47cdb4ae362451cfb8a (diff)
taiko: add direct url to blog posts
-rw-r--r--bandai_namco/taiko.py4
1 files changed, 3 insertions, 1 deletions
diff --git a/bandai_namco/taiko.py b/bandai_namco/taiko.py
index d6c240d..a417a45 100644
--- a/bandai_namco/taiko.py
+++ b/bandai_namco/taiko.py
@@ -18,6 +18,8 @@ def parse_taiko_blog_site(html: str) -> list:
date_str = date_tag.text.strip()
date_obj = datetime.strptime(date_str, "%Y年%m月%d日")
timestamp = int(time.mktime(date_obj.timetuple()))
+ url_date = date_obj.strftime("%Y%m%d")
+ url = base_url + "/?m="+url_date
# Get headline
headline_tag = article.select_one("h1")
@@ -46,7 +48,7 @@ def parse_taiko_blog_site(html: str) -> list:
"timestamp": timestamp,
"headline": headline,
"content": "\n".join(content),
- "url": None,
+ "url": url,
"images": images,
'is_ai_summary': False
}
send patches to the email below
yukais@pinapelz.com
include the subject [PATCH repo_name]
pinapelz.com
homepage