mirror of
https://github.com/searxng/searxng
synced 2024-01-01 19:24:07 +01:00
Merge branch 'master' into duckduckgo_correction
This commit is contained in:
commit
93cbd85b8a
100 changed files with 7507 additions and 641 deletions
|
|
@ -117,14 +117,10 @@ def response(resp):
|
|||
'img_format': img_format,
|
||||
'template': 'images.html'
|
||||
}
|
||||
try:
|
||||
result['author'] = author
|
||||
result['title'] = title
|
||||
result['content'] = content
|
||||
except:
|
||||
result['author'] = ''
|
||||
result['title'] = ''
|
||||
result['content'] = ''
|
||||
result['author'] = author.encode('utf-8', 'ignore').decode('utf-8')
|
||||
result['source'] = source.encode('utf-8', 'ignore').decode('utf-8')
|
||||
result['title'] = title.encode('utf-8', 'ignore').decode('utf-8')
|
||||
result['content'] = content.encode('utf-8', 'ignore').decode('utf-8')
|
||||
results.append(result)
|
||||
|
||||
return results
|
||||
|
|
|
|||
|
|
@ -33,7 +33,7 @@ supported_languages_url = 'https://search.yahoo.com/web/advanced'
|
|||
results_xpath = "//div[contains(concat(' ', normalize-space(@class), ' '), ' Sr ')]"
|
||||
url_xpath = './/h3/a/@href'
|
||||
title_xpath = './/h3/a'
|
||||
content_xpath = './/div[@class="compText aAbs"]'
|
||||
content_xpath = './/div[contains(@class, "compText")]'
|
||||
suggestion_xpath = "//div[contains(concat(' ', normalize-space(@class), ' '), ' AlsoTry ')]//a"
|
||||
|
||||
time_range_dict = {'day': ['1d', 'd'],
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue