[tiktok] fix "KeyError: 'author'" (#8189)
This commit is contained in:
@@ -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"]
|
||||
|
||||
|
||||
Reference in New Issue
Block a user