1
0
Fork 0
mirror of https://github.com/yt-dlp/yt-dlp synced 2025-01-31 12:32:27 +01:00

use urljoin

This commit is contained in:
grqx_wsl 2024-12-25 16:39:38 +13:00
parent a44a1a86b9
commit 213d5d5693

View file

@ -6,6 +6,7 @@ from ..utils import (
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 @@ class NZOnScreenIE(InfoExtractor):
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}]}