Fix rare edge case where comment author is None. (#676)

This happens mostly for older YT profiles that has not set-up a @-handle.
This commit is contained in:
dot-mike 2024-03-11 17:56:18 +01:00 committed by GitHub
parent 6dcef70b8e
commit 45f455070d
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 3 additions and 0 deletions

View File

@ -115,6 +115,9 @@ class Comments:
time_text = time_text_datetime.strftime(format_string)
if not comment.get("author"):
comment["author"] = comment.get("author_id", "Unknown")
cleaned_comment = {
"comment_id": comment["id"],
"comment_text": comment["text"].replace("\xa0", ""),