Skip to content

armgit / mwmbl

Public Imported from GitHub
0

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.tinysearch
index 88dfdae..e0bad11 100644
Binary files a/devdata/index-v2.tinysearch and b/devdata/index-v2.tinysearch differ
diff --git a/mwmbl/views.py b/mwmbl/views.py
index 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 RequestException
from mwmbl.crawler.app import stats_manager
+from mwmbl.justext.utils import get_stoplist
from mwmbl.models import Curation, FlagCuration, DomainSubmission
from mwmbl.search_setup import ranker, index_path
from 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])