From: Ricardo Garcia Date: Mon, 2 Feb 2009 19:29:44 +0000 (+0100) Subject: Use quote_plus instead of manually replacing spaces by plus signs X-Git-Url: http://git.oshgnacknak.de/?a=commitdiff_plain;h=a9633f14577db35ce1bed3f8d623a7be8f287e87;p=youtube-dl Use quote_plus instead of manually replacing spaces by plus signs --- diff --git a/youtube-dl b/youtube-dl index 29afd930f..3e7f13956 100755 --- a/youtube-dl +++ b/youtube-dl @@ -776,7 +776,7 @@ class YoutubeSearchIE(InfoExtractor): while True: self.report_download_page(query, pagenum) - result_url = self._TEMPLATE_URL % (urllib.quote(query.replace(' ', '+')), pagenum) + result_url = self._TEMPLATE_URL % (urllib.quote_plus(query), pagenum) request = urllib2.Request(result_url, None, std_headers) try: page = urllib2.urlopen(request).read()