From e0cfb8fd14d821db3c08bb9a8e0edd4b04e1c1d6 Mon Sep 17 00:00:00 2001 From: philipp Date: Thu, 15 Jul 2021 15:41:13 +0200 Subject: [PATCH] fixed path to datasets --- iocextractor/core/server.py | 2 +- scraper/core/server.py | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/iocextractor/core/server.py b/iocextractor/core/server.py index f05c59f..a947e7b 100644 --- a/iocextractor/core/server.py +++ b/iocextractor/core/server.py @@ -116,7 +116,7 @@ def refetch_blacklist(): content = {} try: if len(Extractor.BLACKLIST) <= 0: - with open(os.path.abspath("../../datasets/blacklist.json")) as content: + with open(os.path.abspath("../datasets/blacklist.json")) as content: content = json.load(content) else: content = read_file_from_gitlab(gitlabserver=GITLAB_SERVER, token=GITLAB_TOKEN, repository=GITLAB_REPO_NAME, file="blacklist.json", servicename=SERVICENAME, branch_name="master") diff --git a/scraper/core/server.py b/scraper/core/server.py index 50dc1e2..a20e608 100644 --- a/scraper/core/server.py +++ b/scraper/core/server.py @@ -284,9 +284,9 @@ def refetch_sources(): twitter_content = {} try: if len(Scraper.SOURCES) <= 0: - with open(os.path.abspath("../../datasets/sources/api_sources.json")) as api_content, open( - os.path.abspath("../../datasets/sources/rss_sources.json")) as rss_content, open( - os.path.abspath("../../datasets/sources/twitter_sources.json")) as twitter_content: + with open(os.path.abspath("../datasets/sources/api_sources.json")) as api_content, open( + os.path.abspath("../datasets/sources/rss_sources.json")) as rss_content, open( + os.path.abspath("../datasets/sources/twitter_sources.json")) as twitter_content: api_content = json.load(api_content) rss_content = json.load(rss_content) twitter_content = json.load(twitter_content)