catch for if self.comments are true but no actual comments in video (#303)

* catch for if self.comments are true but no actual comments in video

* simplifies check code

---------

Co-authored-by: Miguel Sozinho Ramalho <19508417+msramalho@users.noreply.github.com>
This commit is contained in:
Dave Mateer
2025-06-02 13:02:19 +01:00
committed by GitHub
parent e6fdef66df
commit 48be13fb2a

View File

@@ -303,7 +303,7 @@ class GenericExtractor(Extractor):
if "description" in video_data and not result.get("content"):
result.set_content(video_data["description"])
# extract comments if enabled
if self.comments:
if self.comments and video_data.get("comments", []) is not None:
result.set(
"comments",
[