From 59db9f80187c4dc3768f8656ede281347a805e1d Mon Sep 17 00:00:00 2001 From: =?utf8?q?Jaime=20Marqui=CC=81nez=20Ferra=CC=81ndiz?= Date: Thu, 23 Jul 2015 12:09:30 +0200 Subject: [PATCH] [downloader/dash] Improve 'combine_url' (fixes #6341) In some videos the base_url already ends with '/'. --- youtube_dl/downloader/dash.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/youtube_dl/downloader/dash.py b/youtube_dl/downloader/dash.py index a4685d307..8b6fa2753 100644 --- a/youtube_dl/downloader/dash.py +++ b/youtube_dl/downloader/dash.py @@ -37,7 +37,7 @@ class DashSegmentsFD(FileDownloader): 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( -- 2.39.5