mirror of
https://github.com/ytdl-org/youtube-dl.git
synced 2025-08-22 06:14:05 -07:00
Escape percent in output filename
Replace % in filename with %%
This commit is contained in:
parent
daa982bc01
commit
1f94ae5252
1 changed files with 1 additions and 1 deletions
|
@ -689,7 +689,7 @@ class FileDownloader(object):
|
|||
template_dict = dict(info_dict)
|
||||
template_dict['epoch'] = unicode(long(time.time()))
|
||||
template_dict['autonumber'] = unicode('%05d' % self._num_downloads)
|
||||
filename = self.params['outtmpl'] % template_dict
|
||||
filename = self.params['outtmpl'].replace('%','%%') % template_dict
|
||||
return filename
|
||||
except (ValueError, KeyError), err:
|
||||
self.trouble(u'ERROR: invalid system charset or erroneous output template')
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue