浏览代码

htmlize yacy contents

Thomas Renard 8 年前
父节点
当前提交
16c40ffefd
共有 1 个文件被更改,包括 3 次插入1 次删除
  1. 3
    1
      searx/engines/yacy.py

+ 3
- 1
searx/engines/yacy.py 查看文件

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