mirror of
https://github.com/yt-dlp/yt-dlp.git
synced 2025-05-09 15:57:12 -05:00
use urljoin
This commit is contained in:
parent
a44a1a86b9
commit
213d5d5693
1 changed files with 3 additions and 2 deletions
|
@ -6,6 +6,7 @@
|
||||||
traverse_obj,
|
traverse_obj,
|
||||||
url_or_none,
|
url_or_none,
|
||||||
urlhandle_detect_ext,
|
urlhandle_detect_ext,
|
||||||
|
urljoin,
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|
||||||
|
@ -77,7 +78,7 @@ class NZOnScreenIE(InfoExtractor):
|
||||||
}],
|
}],
|
||||||
'info_dict': {
|
'info_dict': {
|
||||||
'id': 'flatmates-episode-one-1997',
|
'id': 'flatmates-episode-one-1997',
|
||||||
'title': 'Flatmates - 1, First Episode',
|
'title': 'Flatmates - Full Series',
|
||||||
},
|
},
|
||||||
'playlist_count': 5,
|
'playlist_count': 5,
|
||||||
}, {
|
}, {
|
||||||
|
@ -124,7 +125,7 @@ def _extract_formats(self, playlist):
|
||||||
def _get_subtitles(self, playinfo, video_id):
|
def _get_subtitles(self, playinfo, video_id):
|
||||||
if caption := traverse_obj(playinfo, ('h264', 'caption_url')):
|
if caption := traverse_obj(playinfo, ('h264', 'caption_url')):
|
||||||
subtitle, urlh = self._download_webpage_handle(
|
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:
|
if subtitle:
|
||||||
return {'en': [{'ext': urlhandle_detect_ext(urlh), 'data': subtitle}]}
|
return {'en': [{'ext': urlhandle_detect_ext(urlh), 'data': subtitle}]}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue