fixed error handeling when no new sites have been found

This commit is contained in:
Askill 2024-07-15 16:14:36 +02:00
parent c3bb229011
commit dadc693af3
1 changed files with 2 additions and 2 deletions

View File

@ -66,8 +66,8 @@ class Watcher:
news = self.site_store.get_site_links(f"{self.remove_protocol(url)}/{list_of_files[-1]}") news = self.site_store.get_site_links(f"{self.remove_protocol(url)}/{list_of_files[-1]}")
if news: if news:
sites_contents = self.site_reader.get_sites_content_static([z.split("'")[1] for z in list(news["dictionary_item_added"])]) sites_contents = self.site_reader.get_sites_content_static([z.split("'")[1] for z in list(news["dictionary_item_added"])])
return sites_contents
return sites_contents return {}
@staticmethod @staticmethod
def search_sites(url, content, keywords: List[str]): def search_sites(url, content, keywords: List[str]):