An open source, non-profit web search engine
Fix add result by correcting import
Daoud Clarkedb8047c4b62a
diff --git a/devdata/index-v2.tinysearch b/devdata/index-v2.tinysearchindex 88dfdae..e0bad11 100644Binary files a/devdata/index-v2.tinysearch and b/devdata/index-v2.tinysearch differdiff --git a/mwmbl/views.py b/mwmbl/views.pyindex 46da74f..1b71fb1 100644--- a/mwmbl/views.py+++ b/mwmbl/views.py@@ -23,6 +23,7 @@ from mwmbl.justext.core import html_to_dom, ParagraphMaker, classify_paragraphs,from requests.exceptions import RequestExceptionfrom mwmbl.crawler.app import stats_manager+from mwmbl.justext.utils import get_stoplistfrom mwmbl.models import Curation, FlagCuration, DomainSubmissionfrom mwmbl.search_setup import ranker, index_pathfrom mwmbl.settings import NUM_EXTRACT_CHARS@@ -142,7 +143,7 @@ def add_url(request):return HttpResponseBadRequest(f"Could not fetch URL: {str(e)}")print("Content", response.encoding)- paragraphs, title = justext_with_dom(response.text, justext.get_stoplist("English"))+ paragraphs, title = justext_with_dom(response.text, get_stoplist("English"))good_paragraphs = [p for p in paragraphs if p.class_type == 'good']extract = ' '.join([p.text for p in good_paragraphs])