[tiktok] fix "KeyError: 'author'" (#8189)

This commit is contained in:
Mike Fährmann
2025-09-10 09:14:55 +02:00
parent 8617c08c6c
commit eaf0591eea
2 changed files with 8 additions and 2 deletions

View File

@@ -42,8 +42,7 @@ class TiktokExtractor(Extractor):
continue
post = video_detail["itemInfo"]["itemStruct"]
author = post["author"]
post["user"] = author["uniqueId"]
post["user"] = (a := post.get("author")) and a["uniqueId"] or ""
post["date"] = text.parse_timestamp(post["createTime"])
original_title = title = post["desc"]