diff options
author | coletdev <coletdjnz@protonmail.com> | 2022-03-14 11:03:40 +1300 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-03-13 22:03:40 +0000 |
commit | b3edc8068e00d558d5fecf79ac36a1c8c7365e3a (patch) | |
tree | 706d1e8a25fa299b75f6763d8c807b4ffc129ed1 /yt_dlp/downloader/mhtml.py | |
parent | 17322130a954577bb03b833d5c435638e51e19f2 (diff) | |
download | hypervideo-pre-b3edc8068e00d558d5fecf79ac36a1c8c7365e3a.tar.lz hypervideo-pre-b3edc8068e00d558d5fecf79ac36a1c8c7365e3a.tar.xz hypervideo-pre-b3edc8068e00d558d5fecf79ac36a1c8c7365e3a.zip |
[downloader/mhtml] Fix fragments with absolute urls (#3044)
Authored-by: coletdjnz
Diffstat (limited to 'yt_dlp/downloader/mhtml.py')
-rw-r--r-- | yt_dlp/downloader/mhtml.py | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/yt_dlp/downloader/mhtml.py b/yt_dlp/downloader/mhtml.py index 1477f65a6..bc86fd1bf 100644 --- a/yt_dlp/downloader/mhtml.py +++ b/yt_dlp/downloader/mhtml.py @@ -166,7 +166,11 @@ body > figure > img { if (i + 1) <= ctx['fragment_index']: continue - fragment_url = urljoin(fragment_base_url, fragment['path']) + fragment_url = fragment.get('url') + if not fragment_url: + assert fragment_base_url + fragment_url = urljoin(fragment_base_url, fragment['path']) + success, frag_content = self._download_fragment(ctx, fragment_url, info_dict) if not success: continue |