aboutsummaryrefslogtreecommitdiff
path: root/youtube_dl
diff options
context:
space:
mode:
authorSergey M․ <dstftw@gmail.com>2017-08-17 23:57:48 +0700
committerSergey M․ <dstftw@gmail.com>2017-08-17 23:58:01 +0700
commit5551d7714d53caaaae32cdedad11a0bdc95efcf1 (patch)
tree8f412d0594aef4023746fecd6c6f0b4b15af7f33 /youtube_dl
parent5f5c7b92dda1da6a0f15af7e3999a6ff298a8c92 (diff)
[generic] Convert redirect URLs to unicode strings (closes #13951)
Diffstat (limited to 'youtube_dl')
-rw-r--r--youtube_dl/extractor/generic.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/youtube_dl/extractor/generic.py b/youtube_dl/extractor/generic.py
index eff5fbfe8..d2fb2627d 100644
--- a/youtube_dl/extractor/generic.py
+++ b/youtube_dl/extractor/generic.py
@@ -2015,7 +2015,7 @@ class GenericIE(InfoExtractor):
if head_response is not False:
# Check for redirect
- new_url = head_response.geturl()
+ new_url = compat_str(head_response.geturl())
if url != new_url:
self.report_following_redirect(new_url)
if force_videoid:
@@ -2116,7 +2116,7 @@ class GenericIE(InfoExtractor):
elif re.match(r'(?i)^(?:{[^}]+})?MPD$', doc.tag):
info_dict['formats'] = self._parse_mpd_formats(
doc, video_id,
- mpd_base_url=full_response.geturl().rpartition('/')[0],
+ mpd_base_url=compat_str(full_response.geturl()).rpartition('/')[0],
mpd_url=url)
self._sort_formats(info_dict['formats'])
return info_dict