mirror of
https://github.com/yt-dlp/yt-dlp.git
synced 2024-11-30 14:20:46 -05:00
Solve the bug of parsing titles with unicode (cyrillic)
This commit is contained in:
parent
b7a34316d2
commit
39973a0236
1 changed files with 8 additions and 4 deletions
|
@ -333,11 +333,15 @@ def _match_entry(self, info_dict):
|
||||||
|
|
||||||
title = info_dict['title']
|
title = info_dict['title']
|
||||||
matchtitle = self.params.get('matchtitle', False)
|
matchtitle = self.params.get('matchtitle', False)
|
||||||
if matchtitle and not re.search(matchtitle, title, re.IGNORECASE):
|
if matchtitle:
|
||||||
return u'[download] "' + title + '" title did not match pattern "' + 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)
|
rejecttitle = self.params.get('rejecttitle', False)
|
||||||
if rejecttitle and re.search(rejecttitle, title, re.IGNORECASE):
|
if rejecttitle:
|
||||||
return u'"' + title + '" title matched reject pattern "' + rejecttitle + '"'
|
rejecttitle = rejecttitle.decode('utf8')
|
||||||
|
if re.search(rejecttitle, title, re.IGNORECASE):
|
||||||
|
return u'"' + title + '" title matched reject pattern "' + rejecttitle + '"'
|
||||||
return None
|
return None
|
||||||
|
|
||||||
def process_info(self, info_dict):
|
def process_info(self, info_dict):
|
||||||
|
|
Loading…
Reference in a new issue