Explorar el Código

htmlize yacy contents

Thomas Renard hace 8 años
padre
commit
16c40ffefd
Se han modificado 1 ficheros con 3 adiciones y 1 borrados
  1. 3
    1
      searx/engines/yacy.py

+ 3
- 1
searx/engines/yacy.py Ver fichero

@@ -16,6 +16,8 @@ from json import loads
16 16
 from urllib import urlencode
17 17
 from dateutil import parser
18 18
 
19
+from searx.utils import html_to_text
20
+
19 21
 # engine dependent config
20 22
 categories = ['general', 'images']  # TODO , 'music', 'videos', 'files'
21 23
 paging = True
@@ -88,7 +90,7 @@ def response(resp):
88 90
             # append result
89 91
             results.append({'url': result['link'],
90 92
                             'title': result['title'],
91
-                            'content': result['description'],
93
+                            'content': html_to_text(result['description']),
92 94
                             'publishedDate': publishedDate})
93 95
 
94 96
         # TODO parse video, audio and file results