| @@ -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 () | |||