diff options
| author | Pinapelz <yukais@pinapelz.com> | 2025-05-22 22:40:29 -0700 |
|---|---|---|
| committer | Pinapelz <yukais@pinapelz.com> | 2025-05-22 22:40:29 -0700 |
| commit | 35973b683c97ef9150107f8fd81910958ff7f57d (patch) | |
| tree | 310302dc1efb61a3b5dff19dfdfd7f3914a986af /bandai_namco | |
| parent | 7e277bad5bd730947bb4b47cdb4ae362451cfb8a (diff) | |
taiko: add direct url to blog posts
Diffstat (limited to 'bandai_namco')
| -rw-r--r-- | bandai_namco/taiko.py | 4 |
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 } |
