diff options
author | Philipp Hagemeister <phihag@phihag.de> | 2012-11-28 00:53:09 +0100 |
---|---|---|
committer | Philipp Hagemeister <phihag@phihag.de> | 2012-11-28 00:53:09 +0100 |
commit | e6137fd61d47ba8624e9baa84701adf929e38849 (patch) | |
tree | e95125f9220402a8eaa41ba842130c684caaf9d1 /youtube_dl | |
parent | 8cd10ac4efb5168f3ceb18ec94338bce73e166a7 (diff) |
Remove superfluous encodings
Diffstat (limited to 'youtube_dl')
-rw-r--r-- | youtube_dl/FileDownloader.py | 12 | ||||
-rw-r--r-- | youtube_dl/utils.py | 1 |
2 files changed, 7 insertions, 6 deletions
diff --git a/youtube_dl/FileDownloader.py b/youtube_dl/FileDownloader.py index 6ddbfc469..9e9f2a0e4 100644 --- a/youtube_dl/FileDownloader.py +++ b/youtube_dl/FileDownloader.py @@ -380,17 +380,17 @@ class FileDownloader(object): # Forced printings if self.params.get('forcetitle', False): - compat_print(info_dict['title'].encode(preferredencoding(), 'xmlcharrefreplace')) + compat_print(info_dict['title']) if self.params.get('forceurl', False): - compat_print(info_dict['url'].encode(preferredencoding(), 'xmlcharrefreplace')) + compat_print(info_dict['url']) if self.params.get('forcethumbnail', False) and 'thumbnail' in info_dict: - compat_print(info_dict['thumbnail'].encode(preferredencoding(), 'xmlcharrefreplace')) + compat_print(info_dict['thumbnail']) if self.params.get('forcedescription', False) and 'description' in info_dict: - compat_print(info_dict['description'].encode(preferredencoding(), 'xmlcharrefreplace')) + compat_print(info_dict['description']) if self.params.get('forcefilename', False) and filename is not None: - compat_print(filename.encode(preferredencoding(), 'xmlcharrefreplace')) + compat_print(filename) if self.params.get('forceformat', False): - compat_print(info_dict['format'].encode(preferredencoding(), 'xmlcharrefreplace')) + compat_print(info_dict['format']) # Do nothing else if in simulate mode if self.params.get('simulate', False): diff --git a/youtube_dl/utils.py b/youtube_dl/utils.py index 9db7b9d9d..0aa350e64 100644 --- a/youtube_dl/utils.py +++ b/youtube_dl/utils.py @@ -87,6 +87,7 @@ if sys.version_info < (3,0): print(s.encode(preferredencoding(), 'xmlcharrefreplace')) else: def compat_print(s): + assert type(s) == type(u'') print(s) def htmlentity_transform(matchobj): |