aboutsummaryrefslogtreecommitdiffstats
path: root/yt_dlp/YoutubeDL.py
diff options
context:
space:
mode:
authorpukkandan <pukkandan.ytdlp@gmail.com>2022-09-01 16:23:18 +0530
committerpukkandan <pukkandan.ytdlp@gmail.com>2022-09-01 16:46:32 +0530
commit1ac7f461845b3f9c0c3a2e6a1308bf82d3e8e55a (patch)
tree0bab563c761f7687dc1459311bf0b5108756a771 /yt_dlp/YoutubeDL.py
parent05deb747bb18febb803b47119ca7bc432ffb80c8 (diff)
downloadhypervideo-pre-1ac7f461845b3f9c0c3a2e6a1308bf82d3e8e55a.tar.lz
hypervideo-pre-1ac7f461845b3f9c0c3a2e6a1308bf82d3e8e55a.tar.xz
hypervideo-pre-1ac7f461845b3f9c0c3a2e6a1308bf82d3e8e55a.zip
Update to ytdl-commit-ed5c44e7
[compat] Replace deficient ChainMap class in Py3.3 and earlier https://github.com/ytdl-org/youtube-dl/commit/ed5c44e7b74ac77f87ca5ed6cb5e964a0c6a0678
Diffstat (limited to 'yt_dlp/YoutubeDL.py')
-rw-r--r--yt_dlp/YoutubeDL.py8
1 files changed, 4 insertions, 4 deletions
diff --git a/yt_dlp/YoutubeDL.py b/yt_dlp/YoutubeDL.py
index 10c17ea00..2b5b3fdfc 100644
--- a/yt_dlp/YoutubeDL.py
+++ b/yt_dlp/YoutubeDL.py
@@ -2528,9 +2528,6 @@ class YoutubeDL:
'--live-from-start is passed, but there are no formats that can be downloaded from the start. '
'If you want to download from the current time, use --no-live-from-start'))
- if not formats:
- self.raise_no_formats(info_dict)
-
def is_wellformed(f):
url = f.get('url')
if not url:
@@ -2543,7 +2540,10 @@ class YoutubeDL:
return True
# Filter out malformed formats for better extraction robustness
- formats = list(filter(is_wellformed, formats))
+ formats = list(filter(is_wellformed, formats or []))
+
+ if not formats:
+ self.raise_no_formats(info_dict)
formats_dict = {}