mirror of
https://github.com/yt-dlp/yt-dlp.git
synced 2024-11-02 17:22:31 +01:00
[downloader/dash] Improve 'combine_url' (fixes #6341)
In some videos the base_url already ends with '/'.
This commit is contained in:
parent
b73b14f72c
commit
59db9f8018
@ -37,7 +37,7 @@ def append_url_to_file(outf, target_url, target_name, remaining_bytes=None):
|
||||
def combine_url(base_url, target_url):
|
||||
if re.match(r'^https?://', target_url):
|
||||
return target_url
|
||||
return '%s/%s' % (base_url, target_url)
|
||||
return '%s%s%s' % (base_url, '' if base_url.endswith('/') else '/', target_url)
|
||||
|
||||
with open(tmpfilename, 'wb') as outf:
|
||||
append_url_to_file(
|
||||
|
Loading…
Reference in New Issue
Block a user