diff options
author | Philipp Hagemeister <phihag@phihag.de> | 2013-06-21 01:22:47 +0200 |
---|---|---|
committer | Philipp Hagemeister <phihag@phihag.de> | 2013-06-21 01:22:47 +0200 |
commit | 50d2376769725fcab6472d09919d78f92cb19005 (patch) | |
tree | d7698b80f72af824146fd92b2568c6806f1ad52b | |
parent | 759d525301477bd04607b05cf583ffa68951d0b5 (diff) |
Leave out sig if not present (#896)
-rwxr-xr-x | youtube_dl/InfoExtractors.py | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/youtube_dl/InfoExtractors.py b/youtube_dl/InfoExtractors.py index 17e0f8323..8d228d40d 100755 --- a/youtube_dl/InfoExtractors.py +++ b/youtube_dl/InfoExtractors.py @@ -732,8 +732,11 @@ class YoutubeIE(InfoExtractor): for url_data_str in video_info['url_encoded_fmt_stream_map'][0].split(','): url_data = compat_parse_qs(url_data_str) if 'itag' in url_data and 'url' in url_data: - url = url_data['url'][0] + '&signature=' + url_data['sig'][0] - if not 'ratebypass' in url: url += '&ratebypass=yes' + url = url_data['url'][0] + if 'sig' in url_data: + url += '&signature=' + url_data['sig'][0] + if 'ratebypass' not in url: + url += '&ratebypass=yes' url_map[url_data['itag'][0]] = url format_limit = self._downloader.params.get('format_limit', None) |