]> jfr.im git - yt-dlp.git/commitdiff
Fix `--check-formats` for `mhtml`
authorpukkandan <redacted>
Sat, 20 Nov 2021 02:57:47 +0000 (08:27 +0530)
committerpukkandan <redacted>
Sat, 20 Nov 2021 03:03:55 +0000 (08:33 +0530)
Closes #1709

yt_dlp/downloader/mhtml.py

index b75db18a8a9bc873e7fe375f498253c275566ed0..1477f65a692afd7a1d3c3ff9f3df821367439486 100644 (file)
@@ -114,8 +114,8 @@ def real_download(self, filename, info_dict):
         fragment_base_url = info_dict.get('fragment_base_url')
         fragments = info_dict['fragments'][:1] if self.params.get(
             'test', False) else info_dict['fragments']
-        title = info_dict['title']
-        origin = info_dict['webpage_url']
+        title = info_dict.get('title', info_dict['format_id'])
+        origin = info_dict.get('webpage_url', info_dict['url'])
 
         ctx = {
             'filename': filename,