From f34ff2a0f601624eb3ef271a4200092a4c8c2f54 Mon Sep 17 00:00:00 2001 From: miteruzo Date: Sun, 29 Mar 2026 17:58:13 +0900 Subject: [PATCH] #20 --- update_db.py | 78 ++++++++++++++++++++++++++-------------------------- 1 file changed, 39 insertions(+), 39 deletions(-) diff --git a/update_db.py b/update_db.py index 530d5ce..ac0da19 100644 --- a/update_db.py +++ b/update_db.py @@ -34,45 +34,6 @@ logging.basicConfig ( format = '%(asctime)s %(levelname)s %(message)s') -class SearchNicoResult (TypedDict): - videos: list['VideoResult'] - is_complete: bool - - -class UpdateContext (TypedDict): - api_data: list['VideoResult'] - comments_by_video_code: dict[str, list['CommentResult']] - deletable: bool - - -class VideoSearchParam (TypedDict): - q: str - targets: str - _sort: str - fields: str - _limit: int - jsonFilter: str - - -class VideoResult (TypedDict): - contentId: str - userId: int | None - title: str - tags: str - description: str | None - viewCounter: int - startTime: str - - -class CommentResult (TypedDict): - no: int - userId: str - body: str - postedAt: str - nicoruCount: int - vposMs: int - - def main ( ) -> None: now = datetime.now () @@ -389,5 +350,44 @@ def normalise ( unicodedata.normalize ('NFKC', text.strip ())).lower () +class SearchNicoResult (TypedDict): + videos: list['VideoResult'] + is_complete: bool + + +class UpdateContext (TypedDict): + api_data: list['VideoResult'] + comments_by_video_code: dict[str, list['CommentResult']] + deletable: bool + + +class VideoSearchParam (TypedDict): + q: str + targets: str + _sort: str + fields: str + _limit: int + jsonFilter: str + + +class VideoResult (TypedDict): + contentId: str + userId: int | None + title: str + tags: str + description: str | None + viewCounter: int + startTime: str + + +class CommentResult (TypedDict): + no: int + userId: str + body: str + postedAt: str + nicoruCount: int + vposMs: int + + if __name__ == '__main__': main ()