From 213d5d5693edbf859eaf25894e68ac99c3bd1f91 Mon Sep 17 00:00:00 2001 From: grqx_wsl <173253225+grqx@users.noreply.github.com> Date: Wed, 25 Dec 2024 16:39:38 +1300 Subject: [PATCH] use urljoin --- yt_dlp/extractor/nzonscreen.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/yt_dlp/extractor/nzonscreen.py b/yt_dlp/extractor/nzonscreen.py index f1e831512..efaaae30d 100644 --- a/yt_dlp/extractor/nzonscreen.py +++ b/yt_dlp/extractor/nzonscreen.py @@ -6,6 +6,7 @@ traverse_obj, url_or_none, urlhandle_detect_ext, + urljoin, ) @@ -77,7 +78,7 @@ class NZOnScreenIE(InfoExtractor): }], 'info_dict': { 'id': 'flatmates-episode-one-1997', - 'title': 'Flatmates - 1, First Episode', + 'title': 'Flatmates - Full Series', }, 'playlist_count': 5, }, { @@ -124,7 +125,7 @@ def _extract_formats(self, playlist): def _get_subtitles(self, playinfo, video_id): if caption := traverse_obj(playinfo, ('h264', 'caption_url')): subtitle, urlh = self._download_webpage_handle( - 'https://www.nzonscreen.com' + caption, video_id, 'Downloading subtitles') + urljoin('https://www.nzonscreen.com', caption), video_id, 'Downloading subtitles') if subtitle: return {'en': [{'ext': urlhandle_detect_ext(urlh), 'data': subtitle}]}