An open source, non-profit web search engine
Fix path to stoplists
Daoud Clarke5ef09fc170cc
diff --git a/crawl.py b/crawl.pyindex 7f093e5..b38c595 100644--- a/crawl.py+++ b/crawl.py@@ -63,6 +63,7 @@ def process_batch_continuously():def process_batch():user_id = "test"urls = url_queue.get_batch(user_id)+ logger.info(f"Processing batch of {len(urls)} URLs")results = crawl_batch(urls, 20)for result in results:print("Result", result)diff --git a/mwmbl/justext/utils.py b/mwmbl/justext/utils.pyindex 42e5074..bf04e3a 100644--- a/mwmbl/justext/utils.py+++ b/mwmbl/justext/utils.py@@ -7,6 +7,7 @@ import reimport osimport sysimport pkgutil+from pathlib import PathMULTIPLE_WHITESPACE_PATTERN = re.compile(r"\s+", re.UNICODE)@@ -36,8 +37,7 @@ def is_blank(string):def get_stoplists():"""Returns a collection of built-in stop-lists."""- path_to_stoplists = os.path.dirname(sys.modules["justext"].__file__)- path_to_stoplists = os.path.join(path_to_stoplists, "stoplists")+ path_to_stoplists = Path(__file__).parent / "stoplists"stoplist_names = []for filename in os.listdir(path_to_stoplists):