diff options
author | Ricardo Garcia <sarbalap+freshmeat@gmail.com> | 2009-09-20 00:10:32 +0200 |
---|---|---|
committer | Ricardo Garcia <sarbalap+freshmeat@gmail.com> | 2010-10-31 11:24:56 +0100 |
commit | f5a5bec35145bad8ecba149b65254bb0cfa70b78 (patch) | |
tree | cbb44a42528e337e821b5f9ae1cecf6684ceb478 | |
parent | f94b636c3ec6410570e5d384e66d651a89de6abe (diff) |
Avoid using Unicode strings when forming URL requests (fixes issue #50)
-rwxr-xr-x | youtube-dl | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/youtube-dl b/youtube-dl index 5efc55e6d..047cc37f8 100755 --- a/youtube-dl +++ b/youtube-dl @@ -309,7 +309,7 @@ class FileDownloader(object): # Do nothing else if in simulate mode if self.params.get('simulate', False): try: - info_dict['url'] = self.verify_url(info_dict['url']) + info_dict['url'] = self.verify_url(info_dict['url'].encode('utf-8')).decode('utf-8') except (OSError, IOError, urllib2.URLError, httplib.HTTPException, socket.error), err: raise UnavailableFormatError @@ -338,7 +338,7 @@ class FileDownloader(object): return try: - success = self._do_download(filename, info_dict['url']) + success = self._do_download(filename, info_dict['url'].encode('utf-8')) except (OSError, IOError), err: raise UnavailableFormatError except (urllib2.URLError, httplib.HTTPException, socket.error), err: |