better error handling in comment extraction
This commit is contained in:
parent
02be39b6ed
commit
fa43753614
|
@ -63,6 +63,7 @@ class Comments:
|
||||||
"check_formats": None,
|
"check_formats": None,
|
||||||
"skip_download": True,
|
"skip_download": True,
|
||||||
"getcomments": True,
|
"getcomments": True,
|
||||||
|
"ignoreerrors": True,
|
||||||
"extractor_args": {
|
"extractor_args": {
|
||||||
"youtube": {
|
"youtube": {
|
||||||
"max_comments": max_comments_list,
|
"max_comments": max_comments_list,
|
||||||
|
@ -119,14 +120,14 @@ class Comments:
|
||||||
"comment_text": comment["text"].replace("\xa0", ""),
|
"comment_text": comment["text"].replace("\xa0", ""),
|
||||||
"comment_timestamp": comment["timestamp"],
|
"comment_timestamp": comment["timestamp"],
|
||||||
"comment_time_text": time_text,
|
"comment_time_text": time_text,
|
||||||
"comment_likecount": comment["like_count"],
|
"comment_likecount": comment.get("like_count", None),
|
||||||
"comment_is_favorited": comment.get(
|
"comment_is_favorited": comment.get("is_favorited", False),
|
||||||
"is_favorited"
|
|
||||||
), # temporary fix for yt-dlp upstream issue 7389
|
|
||||||
"comment_author": comment["author"],
|
"comment_author": comment["author"],
|
||||||
"comment_author_id": comment["author_id"],
|
"comment_author_id": comment["author_id"],
|
||||||
"comment_author_thumbnail": comment["author_thumbnail"],
|
"comment_author_thumbnail": comment["author_thumbnail"],
|
||||||
"comment_author_is_uploader": comment["author_is_uploader"],
|
"comment_author_is_uploader": comment.get(
|
||||||
|
"comment_author_is_uploader", False
|
||||||
|
),
|
||||||
"comment_parent": comment["parent"],
|
"comment_parent": comment["parent"],
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue