1
0
Fork 0
mirror of https://github.com/ytdl-org/youtube-dl.git synced 2024-12-23 01:08:10 +00:00

[downloader/dash] Improve 'combine_url' (fixes #6341)

In some videos the base_url already ends with '/'.
This commit is contained in:
Jaime Marquínez Ferrándiz 2015-07-23 12:09:30 +02:00
parent b73b14f72c
commit 59db9f8018

View file

@ -37,7 +37,7 @@ class DashSegmentsFD(FileDownloader):
def combine_url(base_url, target_url): def combine_url(base_url, target_url):
if re.match(r'^https?://', target_url): if re.match(r'^https?://', target_url):
return 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: with open(tmpfilename, 'wb') as outf:
append_url_to_file( append_url_to_file(