aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSergey M․ <dstftw@gmail.com>2017-07-29 15:02:41 +0700
committerSergey M․ <dstftw@gmail.com>2017-07-29 15:02:41 +0700
commitc5a49ff08413411174837f1034ef439b79ff774b (patch)
treed0aa8ff8e5fccf0047ec2edb78a8f9d840e2019b
parent24e966e8dab954136dabbc497064ac63b252495b (diff)
[downloader/hls] Use redirect URL as manifest base (#13755)
-rw-r--r--youtube_dl/downloader/hls.py6
1 files changed, 3 insertions, 3 deletions
diff --git a/youtube_dl/downloader/hls.py b/youtube_dl/downloader/hls.py
index 0e29c8a2a..46308cf07 100644
--- a/youtube_dl/downloader/hls.py
+++ b/youtube_dl/downloader/hls.py
@@ -59,9 +59,9 @@ class HlsFD(FragmentFD):
man_url = info_dict['url']
self.to_screen('[%s] Downloading m3u8 manifest' % self.FD_NAME)
- manifest = self.ydl.urlopen(self._prepare_url(info_dict, man_url)).read()
-
- s = manifest.decode('utf-8', 'ignore')
+ urlh = self.ydl.urlopen(self._prepare_url(info_dict, man_url))
+ man_url = urlh.geturl()
+ s = urlh.read().decode('utf-8', 'ignore')
if not self.can_download(s, info_dict):
if info_dict.get('extra_param_to_segment_url'):