def search_entries_by_title(self, title):
"""Search For a Specified Title in the Entries_Table
Args:
title(str): the title you are searching for
Return:
result(collection): the search result
"""
entries_table = self.db["Entries_Table"]
try:
result = entries_table.find_one({"Title": title})
return result
except errors.ServerSelectionTimeoutError:
print('ERROR : No connection could be made because'
' the target machine actively refused it')
return False
# TODO Modify to allow multiple results using find(),
# TODO also find similar results which are not exact matches
评论列表
文章目录