diff --git a/main.py b/main.py index 8c1f728..2be9c39 100644 --- a/main.py +++ b/main.py @@ -1,4 +1,4 @@ from src.Watcher import Watcher if __name__ == "__main__": - Watcher("../sites.txt", "../keywords.txt").watch() \ No newline at end of file + Watcher("../sites.txt", "../keywords.txt").watch(3600) \ No newline at end of file diff --git a/sites.txt b/sites.txt index bfa2eeb..6b14489 100644 --- a/sites.txt +++ b/sites.txt @@ -1 +1 @@ -https://www.patricematz.de \ No newline at end of file +https://www.patricematz.de/ \ No newline at end of file diff --git a/src/Watcher.py b/src/Watcher.py index e4c7182..28db13a 100644 --- a/src/Watcher.py +++ b/src/Watcher.py @@ -18,7 +18,7 @@ class Watcher: with open(path) as f: return f.read().splitlines() - def watch(self): + def watch(self, sleep): while True: keywords = self.read_txt_file(self.keywords_source_path) sites = self.read_txt_file(self.sites_source_path) @@ -36,7 +36,7 @@ class Watcher: for url, content in contents.items(): matches.append(self.search_sites(url, content, keywords)) print(matches) - time.sleep(3600) + time.sleep(sleep) @staticmethod def remove_protocol(site): diff --git a/src/cache/www.patricematz.de/2022-10-15_15-35-49.json b/src/cache/www.patricematz.de/2022-10-15_15-35-49.json deleted file mode 100644 index bcdee74..0000000 --- a/src/cache/www.patricematz.de/2022-10-15_15-35-49.json +++ /dev/null @@ -1 +0,0 @@ -{"https://www.patricematz.de": ["https://www.patricematz.de/", "https://www.linkedin.com/in/patrice-matz-b73b6814a/", "https://github.com/Askill", "https://www.patricematz.de/images/praktikum.pdf", "https://www.patricematz.de/images/bachelor.pdf", "https://www.patricematz.de/images/21-Master-Thesis-Matz.pdf", "https://irs.projects.patricematz.de", "https://github.com/Askill/Inverse-Rezeptsuche", "https://irs.projects.patricematz.de/", "https://github.com/Askill/Video-Synopsis", "https://github.com/Askill/UI", "https://github.com/Askill/Photo-Wall", "https://www.patricematz.de/photowall/demo/", "https://github.com/Askill/Flask-URL-Checker", "https://patricematz.de/starmapper.htm"], "https://www.patricematz.de/photowall/demo/": ["javascript:void(0)"], "https://www.patricematz.de/images/21-Master-Thesis-Matz.pdf": [], "https://www.patricematz.de/images/bachelor.pdf": [], "https://www.patricematz.de/images/praktikum.pdf": [], "https://www.patricematz.de/": ["https://www.patricematz.de/", "https://www.linkedin.com/in/patrice-matz-b73b6814a/", "https://github.com/Askill", "https://www.patricematz.de/images/praktikum.pdf", "https://www.patricematz.de/images/bachelor.pdf", "https://www.patricematz.de/images/21-Master-Thesis-Matz.pdf", "https://irs.projects.patricematz.de", "https://github.com/Askill/Inverse-Rezeptsuche", "https://irs.projects.patricematz.de/", "https://github.com/Askill/Video-Synopsis", "https://github.com/Askill/UI", "https://github.com/Askill/Photo-Wall", "https://www.patricematz.de/photowall/demo/", "https://github.com/Askill/Flask-URL-Checker", "https://patricematz.de/starmapper.htm"]} \ No newline at end of file diff --git a/src/cache/www.patricematz.de/2022-10-15_15-36-32.json b/src/cache/www.patricematz.de/2022-10-15_15-36-32.json deleted file mode 100644 index bcdee74..0000000 --- a/src/cache/www.patricematz.de/2022-10-15_15-36-32.json +++ /dev/null @@ -1 +0,0 @@ -{"https://www.patricematz.de": ["https://www.patricematz.de/", "https://www.linkedin.com/in/patrice-matz-b73b6814a/", "https://github.com/Askill", "https://www.patricematz.de/images/praktikum.pdf", "https://www.patricematz.de/images/bachelor.pdf", "https://www.patricematz.de/images/21-Master-Thesis-Matz.pdf", "https://irs.projects.patricematz.de", "https://github.com/Askill/Inverse-Rezeptsuche", "https://irs.projects.patricematz.de/", "https://github.com/Askill/Video-Synopsis", "https://github.com/Askill/UI", "https://github.com/Askill/Photo-Wall", "https://www.patricematz.de/photowall/demo/", "https://github.com/Askill/Flask-URL-Checker", "https://patricematz.de/starmapper.htm"], "https://www.patricematz.de/photowall/demo/": ["javascript:void(0)"], "https://www.patricematz.de/images/21-Master-Thesis-Matz.pdf": [], "https://www.patricematz.de/images/bachelor.pdf": [], "https://www.patricematz.de/images/praktikum.pdf": [], "https://www.patricematz.de/": ["https://www.patricematz.de/", "https://www.linkedin.com/in/patrice-matz-b73b6814a/", "https://github.com/Askill", "https://www.patricematz.de/images/praktikum.pdf", "https://www.patricematz.de/images/bachelor.pdf", "https://www.patricematz.de/images/21-Master-Thesis-Matz.pdf", "https://irs.projects.patricematz.de", "https://github.com/Askill/Inverse-Rezeptsuche", "https://irs.projects.patricematz.de/", "https://github.com/Askill/Video-Synopsis", "https://github.com/Askill/UI", "https://github.com/Askill/Photo-Wall", "https://www.patricematz.de/photowall/demo/", "https://github.com/Askill/Flask-URL-Checker", "https://patricematz.de/starmapper.htm"]} \ No newline at end of file diff --git a/src/cache/www.patricematz.de/2022-10-15_15-36-40.json b/src/cache/www.patricematz.de/2022-10-15_15-36-40.json deleted file mode 100644 index bcdee74..0000000 --- a/src/cache/www.patricematz.de/2022-10-15_15-36-40.json +++ /dev/null @@ -1 +0,0 @@ -{"https://www.patricematz.de": ["https://www.patricematz.de/", "https://www.linkedin.com/in/patrice-matz-b73b6814a/", "https://github.com/Askill", "https://www.patricematz.de/images/praktikum.pdf", "https://www.patricematz.de/images/bachelor.pdf", "https://www.patricematz.de/images/21-Master-Thesis-Matz.pdf", "https://irs.projects.patricematz.de", "https://github.com/Askill/Inverse-Rezeptsuche", "https://irs.projects.patricematz.de/", "https://github.com/Askill/Video-Synopsis", "https://github.com/Askill/UI", "https://github.com/Askill/Photo-Wall", "https://www.patricematz.de/photowall/demo/", "https://github.com/Askill/Flask-URL-Checker", "https://patricematz.de/starmapper.htm"], "https://www.patricematz.de/photowall/demo/": ["javascript:void(0)"], "https://www.patricematz.de/images/21-Master-Thesis-Matz.pdf": [], "https://www.patricematz.de/images/bachelor.pdf": [], "https://www.patricematz.de/images/praktikum.pdf": [], "https://www.patricematz.de/": ["https://www.patricematz.de/", "https://www.linkedin.com/in/patrice-matz-b73b6814a/", "https://github.com/Askill", "https://www.patricematz.de/images/praktikum.pdf", "https://www.patricematz.de/images/bachelor.pdf", "https://www.patricematz.de/images/21-Master-Thesis-Matz.pdf", "https://irs.projects.patricematz.de", "https://github.com/Askill/Inverse-Rezeptsuche", "https://irs.projects.patricematz.de/", "https://github.com/Askill/Video-Synopsis", "https://github.com/Askill/UI", "https://github.com/Askill/Photo-Wall", "https://www.patricematz.de/photowall/demo/", "https://github.com/Askill/Flask-URL-Checker", "https://patricematz.de/starmapper.htm"]} \ No newline at end of file diff --git a/src/cache/www.patricematz.de/2022-10-15_15-36-59.json b/src/cache/www.patricematz.de/2022-10-15_15-36-59.json deleted file mode 100644 index bcdee74..0000000 --- a/src/cache/www.patricematz.de/2022-10-15_15-36-59.json +++ /dev/null @@ -1 +0,0 @@ -{"https://www.patricematz.de": ["https://www.patricematz.de/", "https://www.linkedin.com/in/patrice-matz-b73b6814a/", "https://github.com/Askill", "https://www.patricematz.de/images/praktikum.pdf", "https://www.patricematz.de/images/bachelor.pdf", "https://www.patricematz.de/images/21-Master-Thesis-Matz.pdf", "https://irs.projects.patricematz.de", "https://github.com/Askill/Inverse-Rezeptsuche", "https://irs.projects.patricematz.de/", "https://github.com/Askill/Video-Synopsis", "https://github.com/Askill/UI", "https://github.com/Askill/Photo-Wall", "https://www.patricematz.de/photowall/demo/", "https://github.com/Askill/Flask-URL-Checker", "https://patricematz.de/starmapper.htm"], "https://www.patricematz.de/photowall/demo/": ["javascript:void(0)"], "https://www.patricematz.de/images/21-Master-Thesis-Matz.pdf": [], "https://www.patricematz.de/images/bachelor.pdf": [], "https://www.patricematz.de/images/praktikum.pdf": [], "https://www.patricematz.de/": ["https://www.patricematz.de/", "https://www.linkedin.com/in/patrice-matz-b73b6814a/", "https://github.com/Askill", "https://www.patricematz.de/images/praktikum.pdf", "https://www.patricematz.de/images/bachelor.pdf", "https://www.patricematz.de/images/21-Master-Thesis-Matz.pdf", "https://irs.projects.patricematz.de", "https://github.com/Askill/Inverse-Rezeptsuche", "https://irs.projects.patricematz.de/", "https://github.com/Askill/Video-Synopsis", "https://github.com/Askill/UI", "https://github.com/Askill/Photo-Wall", "https://www.patricematz.de/photowall/demo/", "https://github.com/Askill/Flask-URL-Checker", "https://patricematz.de/starmapper.htm"]} \ No newline at end of file diff --git a/src/cache/www.patricematz.de/2022-10-15_15-40-54.json b/src/cache/www.patricematz.de/2022-10-15_15-40-54.json new file mode 100644 index 0000000..82c72e4 --- /dev/null +++ b/src/cache/www.patricematz.de/2022-10-15_15-40-54.json @@ -0,0 +1,25 @@ +{ + "https://www.patricematz.de/": [ + "https://www.patricematz.de/", + "https://www.linkedin.com/in/patrice-matz-b73b6814a/", + "https://github.com/Askill", + "https://www.patricematz.de/images/praktikum.pdf", + "https://www.patricematz.de/images/bachelor.pdf", + "https://www.patricematz.de/images/21-Master-Thesis-Matz.pdf", + "https://irs.projects.patricematz.de", + "https://github.com/Askill/Inverse-Rezeptsuche", + "https://irs.projects.patricematz.de/", + "https://github.com/Askill/Video-Synopsis", + "https://github.com/Askill/UI", + "https://github.com/Askill/Photo-Wall", + "https://www.patricematz.de/photowall/demo/", + "https://github.com/Askill/Flask-URL-Checker", + "https://patricematz.de/starmapper.htm" + ], + "https://www.patricematz.de/photowall/demo/": [ + "javascript:void(0)" + ], + "https://www.patricematz.de/images/21-Master-Thesis-Matz.pdf": [], + "https://www.patricematz.de/images/bachelor.pdf": [], + "https://www.patricematz.de/images/praktikum.pdf": [] +} \ No newline at end of file