Skip to content

A feature-rich command-line audio/video downloader

[ie/reddit] Support `--ignore-no-formats-error` (#12993)

bashonly28f04e8a5e38
diff --git a/yt_dlp/extractor/reddit.py b/yt_dlp/extractor/reddit.py
index a7a6a75dc4..be4c32e135 100644
--- a/yt_dlp/extractor/reddit.py
+++ b/yt_dlp/extractor/reddit.py
@@ -388,7 +388,8 @@ class RedditIE(InfoExtractor):
})
if entries:
return self.playlist_result(entries, video_id, **info)
- raise ExtractorError('No media found', expected=True)
+ self.raise_no_formats('No media found', expected=True, video_id=video_id)
+ return {**info, 'id': video_id}
# Check if media is hosted on reddit:
reddit_video = traverse_obj(data, (