A feature-rich command-line audio/video downloader
Solve the bug of parsing titles with unicode (cyrillic)
Art Zhitnik39973a023687
diff --git a/youtube_dl/FileDownloader.py b/youtube_dl/FileDownloader.pyindex ed5a79f13d..4449fe711f 100644--- a/youtube_dl/FileDownloader.py+++ b/youtube_dl/FileDownloader.py@@ -333,11 +333,15 @@ class FileDownloader(object):title = info_dict['title']matchtitle = self.params.get('matchtitle', False)- if matchtitle and not re.search(matchtitle, title, re.IGNORECASE):- return u'[download] "' + title + '" title did not match pattern "' + matchtitle + '"'+ if matchtitle:+ matchtitle = matchtitle.decode('utf8')+ if not re.search(matchtitle, title, re.IGNORECASE):+ return u'[download] "' + title + '" title did not match pattern "' + matchtitle + '"'rejecttitle = self.params.get('rejecttitle', False)- if rejecttitle and re.search(rejecttitle, title, re.IGNORECASE):- return u'"' + title + '" title matched reject pattern "' + rejecttitle + '"'+ if rejecttitle:+ rejecttitle = rejecttitle.decode('utf8')+ if re.search(rejecttitle, title, re.IGNORECASE):+ return u'"' + title + '" title matched reject pattern "' + rejecttitle + '"'return Nonedef process_info(self, info_dict):