From 35973b683c97ef9150107f8fd81910958ff7f57d Mon Sep 17 00:00:00 2001 From: Pinapelz Date: Thu, 22 May 2025 22:40:29 -0700 Subject: taiko: add direct url to blog posts --- bandai_namco/taiko.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'bandai_namco') 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 } -- cgit v1.2.3