A feature-rich command-line audio/video downloader
[reddit] Prevent infinite loop
pukkandan07689fc14969
diff --git a/yt_dlp/extractor/reddit.py b/yt_dlp/extractor/reddit.pyindex a042a59cc4..aabc8dba9b 100644--- a/yt_dlp/extractor/reddit.py+++ b/yt_dlp/extractor/reddit.py@@ -1,4 +1,5 @@import random+from urllib.parse import urlparsefrom .common import InfoExtractorfrom ..utils import (@@ -19,6 +20,7 @@ class RedditIE(InfoExtractor):'info_dict': {'id': 'zv89llsvexdz','ext': 'mp4',+ 'display_id': '6rrwyj','title': 'That small heart attack.','thumbnail': r're:^https?://.*\.(?:jpg|png)','thumbnails': 'count:4',@@ -158,6 +160,15 @@ class RedditIE(InfoExtractor):'duration': int_or_none(reddit_video.get('duration')),}+ parsed_url = urlparse(video_url)+ if parsed_url.netloc == 'v.redd.it':+ self.raise_no_formats('This video is processing', expected=True, video_id=video_id)+ return {+ **info,+ 'id': parsed_url.path.split('/')[1],+ 'display_id': video_id,+ }+# Not hosted on reddit, must continue extractionreturn {**info,