def fuzzy_match(self, items, test):
''' Fuzzy matches title with predb rss titles
:param items: list of titles in predb rss
:param test: str to match to rss titles
Returns bool if any one 'items' fuzzy matches above 50%
'''
for item in items:
match = fuzz.partial_ratio(item, test)
if match > 50:
return True
return False
评论列表
文章目录