youtube-dl

Another place where youtube-dl lives on
git clone git://git.oshgnacknak.de/youtube-dl.git
Log | Files | Refs | README | LICENSE

commit 0526e4f55a822cb629ca06bb02d695eac2ef4a60
parent 5d40a470a2c62f33de54f14a04dfab997e6503fe
Author: Filippo Valsorda <filippo.valsorda@gmail.com>
Date:   Sun, 11 Nov 2012 06:22:10 -0800

Merge pull request #522 from art-zhitnik/master

--(match|reject)-title utf8 fix
Diffstat:
Myoutube_dl/FileDownloader.py | 12++++++++----
1 file changed, 8 insertions(+), 4 deletions(-)

diff --git 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 None def process_info(self, info_dict):