mirror of
https://git.vectorsigma.ru/public/tubearchivist.git
synced 2026-08-04 22:39:38 +00:00
better error handling in comment extraction
This commit is contained in:
@@ -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"],
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user