aboutsummaryrefslogtreecommitdiffstats
path: root/yt_dlp/downloader/mhtml.py
diff options
context:
space:
mode:
Diffstat (limited to 'yt_dlp/downloader/mhtml.py')
-rw-r--r--yt_dlp/downloader/mhtml.py3
1 files changed, 2 insertions, 1 deletions
diff --git a/yt_dlp/downloader/mhtml.py b/yt_dlp/downloader/mhtml.py
index bc86fd1bf..54e711792 100644
--- a/yt_dlp/downloader/mhtml.py
+++ b/yt_dlp/downloader/mhtml.py
@@ -171,9 +171,10 @@ body > figure > img {
assert fragment_base_url
fragment_url = urljoin(fragment_base_url, fragment['path'])
- success, frag_content = self._download_fragment(ctx, fragment_url, info_dict)
+ success = self._download_fragment(ctx, fragment_url, info_dict)
if not success:
continue
+ frag_content = self._read_fragment(ctx)
mime_type = b'image/jpeg'
if frag_content.startswith(b'\x89PNG\r\n\x1a\n'):