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')))