diff --git a/yt_dlp/extractor/common.py b/yt_dlp/extractor/common.py index 30bdcdd02d..6b7ef0b014 100644 --- a/yt_dlp/extractor/common.py +++ b/yt_dlp/extractor/common.py @@ -2334,7 +2334,7 @@ def _parse_smil_formats_and_subtitles( for meta in smil.findall(self._xpath_ns('./head/meta', namespace)): b = meta.get('base') or meta.get('httpBase') if b: - base = f'{b.rstrip("/")}/' + base = b break formats, subtitles = [], {} @@ -2383,7 +2383,7 @@ def _parse_smil_formats_and_subtitles( }) continue - src_url = src if src.startswith('http') else urllib.parse.urljoin(base, src) + src_url = src if src.startswith('http') else urllib.parse.urljoin(f'{b}/', src) src_url = src_url.strip() if proto == 'm3u8' or src_ext == 'm3u8':