Browse Source

いろいろ

feature/query
みてるぞ 1 month ago
parent
commit
bf09176bfe
1 changed files with 3 additions and 1 deletions
  1. +3
    -1
      update_db.py

+ 3
- 1
update_db.py View File

@@ -34,7 +34,7 @@ class VideoResult (TypedDict):
contentId: str contentId: str
title: str title: str
tags: str tags: str
description: str
description: str | None
viewCounter: int viewCounter: int
startTime: str startTime: str


@@ -96,6 +96,8 @@ def update_tables (
title = datum['title'], title = datum['title'],
description = datum['description'], description = datum['description'],
uploaded_at = datetime.fromisoformat (datum['startTime'])) uploaded_at = datetime.fromisoformat (datum['startTime']))
if video.description is None:
video.description = ''
video_dao.upsert (video, False) video_dao.upsert (video, False)
if video.id_ is not None: if video.id_ is not None:
video_ids.append (video.id_) video_ids.append (video.id_)


Loading…
Cancel
Save