mirror of
https://github.com/searxng/searxng.git
synced 2025-07-25 06:09:18 +02:00
[enh] removing result html tags
This commit is contained in:
parent
14a53e3430
commit
17bf00ee42
4 changed files with 7 additions and 6 deletions
|
@ -1,5 +1,6 @@
|
|||
from json import loads
|
||||
from urllib import urlencode
|
||||
from searx.utils import html_to_text
|
||||
|
||||
url = 'https://duckduckgo.com/'
|
||||
search_url = url + 'd.js?{query}&l=us-en&p=1&s=0'
|
||||
|
@ -16,7 +17,7 @@ def response(resp):
|
|||
if not r.get('t'):
|
||||
continue
|
||||
results.append({'title': r['t']
|
||||
,'content': r['a']
|
||||
,'content': html_to_text(r['a'])
|
||||
,'url': r['u']
|
||||
})
|
||||
return results
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue