diff options
author | Sergey M․ <[email protected]> | 2014-07-31 21:23:15 +0700 |
---|---|---|
committer | Sergey M․ <[email protected]> | 2014-07-31 21:23:15 +0700 |
commit | 5622f29ae434be658443970e58303309df63c877 (patch) | |
tree | 0e1207de77aca1421a40b7d572a8759ce1add5da | |
parent | b4f23afbd1dd9ee924828a2ad41a2318f8d6323a (diff) | |
download | youtube-dl-5622f29ae434be658443970e58303309df63c877.tar.gz youtube-dl-5622f29ae434be658443970e58303309df63c877.zip |
[ard] Quote path part instead of whole URL encode
-rw-r--r-- | youtube_dl/extractor/ard.py | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/youtube_dl/extractor/ard.py b/youtube_dl/extractor/ard.py index 7ee2ef463..957bdefcb 100644 --- a/youtube_dl/extractor/ard.py +++ b/youtube_dl/extractor/ard.py @@ -8,6 +8,8 @@ from ..utils import ( determine_ext, ExtractorError, qualities, + compat_urllib_parse_urlparse, + compat_urllib_parse, ) @@ -44,7 +46,10 @@ class ARDIE(InfoExtractor): else: video_id = m.group('video_id') - webpage = self._download_webpage(url.encode('utf-8'), video_id) + urlp = compat_urllib_parse_urlparse(url) + url = urlp._replace(path=compat_urllib_parse.quote(urlp.path.encode('utf-8'))).geturl() + + webpage = self._download_webpage(url, video_id) title = self._html_search_regex( [r'<h1(?:\s+class="boxTopHeadline")?>(.*?)</h1>', |