Fix rare edge case where comment author is None.

This happens mostly for older YT profiles that has not set-up a @-handle.
This commit is contained in:
dot-mike 2024-03-09 15:03:28 +01:00
parent 8778546577
commit f716a3a6ca
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", ""),