From f6ab471e049c23f13c3199e014c8881a40c91129 Mon Sep 17 00:00:00 2001 From: miteruzo Date: Thu, 7 Nov 2024 03:03:14 +0900 Subject: [PATCH] =?UTF-8?q?#1=20base=5Fdate=20=E3=81=8C=E6=84=8F=E5=91=B3?= =?UTF-8?q?=E3=82=92=E3=81=AA=E3=81=97=E3=81=A6=E3=82=90=E3=81=AA=E3=81=8B?= =?UTF-8?q?=E3=81=A3=E3=81=9F=E3=81=AE=E3=82=92=E4=BF=AE=E6=AD=A3?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- nico.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/nico.py b/nico.py index c62b724..2f7a473 100644 --- a/nico.py +++ b/nico.py @@ -127,7 +127,9 @@ def get_kiriban_list ( ) -> list[tuple[int, VideoInfo, datetime]]: kiriban_list: list[tuple[int, VideoInfo, datetime]] = [] - latest_fetched_at = cast (date, VideoHistory.max ('fetched_at')) + latest_fetched_at = cast (date, (VideoHistory + .where ('fetched_at', '<=', base_date) + .max ('fetched_at'))) previous_fetched_at = cast (date, (VideoHistory .where ('fetched_at', '<', latest_fetched_at) .max ('fetched_at')))