Repository: searx/searx

Issue:
Suggestions doesn't look right
<!-- PLEASE FILL THESE FIELDS, IT REALLY HELPS THE MAINTAINERS OF SEARX -->

**Version of Searx, commit number if you are using on master branch and stipulate if you forked Searx**
Commit f231d79a5ddd2ff211e401fe6ea2250325df116f
**How did you install Searx?**
Using the official Nginx guide, vanilla Searx, using Google autocomplete
**What happened?**
The suggestions section of the info bar is messed up
![Screenshot_20220317-200457_Bromite](https://user-images.githubusercontent.com/32814750/158938062-95b4e837-6992-4f4e-a895-9a6cec4d0e05.png)
**How To Reproduce**
1. Go to https://searx.ericaftereric.top/
2. Search for a keyword like "test"

**Expected behavior**
*shot on https://searx.danksquad.org/*
![Screenshot_20220318-123513_Bromite](https://user-images.githubusercontent.com/32814750/158938230-0ad05a4e-ddea-48b0-bf0b-c78035a4cff6.png)
**Screenshots & Logs**
```
eric@localhost:/media/searx$ sudo -H ./utils/searx.sh inspect service
[sudo] password for eric:

service status & log
====================

sourced .config.sh :

  PUBLIC_URL          : http://localhost/searx                  SEARX_URL_PATH      : /searx
  SEARX_INSTANCE_NAME : searx@localhost
  SEARX_INTERNAL_HTTP  : 127.0.0.1:8888                       
INFO:  Service account searx exists.                          INFO:  ~searx: python environment is available.
INFO:  ~searx: Searx software is installed.
INFO:  uWSGI app searx.ini is enabled.
INFO:  public URL   --> http://localhost/searx                INFO:  internal URL --> http://127.0.0.1:8888
INFO:  got 200 from http://127.0.0.1:8888
INFO:  got 429 from http://localhost/searx

Enable searx debug mode? [NO/yes] y
WARN:  Do not enable debug in production enviroments!!
INFO:  try to enable debug mode ...
cd /usr/local/searx/searx-src
sed -i -e "s/debug : False/debug : True/g" "/etc/searx/settings.yml"
INFO:  restart uWSGI service

Unit searx.service could not be found.
// use CTRL-C to stop monitoring the log
DEBUG:searx.network.default:HTTP Request: GET https://query.wikidata.org/sparql?query=%0ASELECT+%3Fitem+%3Fname%0AWHERE+%7B%0A++++%7B%0A++++++SELECT+%3Fitem%0A++++++WHERE+%7B+%3Fitem+wdt%3AP279%2A+wd%3AQ12132+%7D%0A++++%7D+UNION+%7B%0A++++++VALUES+%3Fitem+%7B+wd%3AP571+wd%3AP576+wd%3AP580+wd%3AP582+wd%3AP569+wd%3AP570+wd%3AP619+wd%3AP620+wd%3AP27+wd%3AP495+wd%3AP17+wd%3AP159+wd%3AP36+wd%3AP35+wd%3AP6+wd%3AP122+wd%3AP37+wd%3AP1082+wd%3AP2046+wd%3AP281+wd%3AP38+wd%3AP2048+wd%3AP400+wd%3AP50+wd%3AP170+wd%3AP57+wd%3AP175+wd%3AP178+wd%3AP162+wd%3AP176+wd%3AP58+wd%3AP272+wd%3AP264+wd%3AP123+wd%3AP449+wd%3AP750+wd%3AP86+wd%3AP577+wd%3AP136+wd%3AP364+wd%3AP212+wd%3AP957+wd%3AP275+wd%3AP277+wd%3AP348+wd%3AP840+wd%3AP1098+wd%3AP282+wd%3AP1018+wd%3AP218+wd%3AP169+wd%3AP112+wd%3AP1454+wd%3AP137+wd%3AP1029+wd%3AP225+wd%3AP274+wd%3AP1346+wd%3AP1120+wd%3AP498+wd%3AP856+wd%3AP1324+wd%3AP1581+%7D%0A++++%7D%0A++++OPTIONAL+%7B+%3Fitem+rdfs%3Alabel+%3Fname.+%7D%0A%7D%0A "HTTP/2 200 OK" (application/sparql-results+json;charset=utf-8)
DEBUG:searx.searx.search.processor:Initialized soundcloud
DEBUG:searx.searx.search.processor:Initialized wikidata
DEBUG:httpx._client:HTTP Request: GET https://soundcloud.com "HTTP/2 200 OK"
DEBUG:searx.network.default:HTTP Request: GET https://soundcloud.com "HTTP/2 200 OK" (text/html)
DEBUG:httpx._client:HTTP Request: GET https://a-v2.sndcdn.com/assets/49-2c7cec0a.js "HTTP/2 200 OK"
DEBUG:searx.network.default:HTTP Request: GET https://a-v2.sndcdn.com/assets/49-2c7cec0a.js "HTTP/2 200 OK" (application/javascript)
DEBUG:searx.searx.search.processor:Initialized soundcloud
DEBUG:searx.wikidata:request time 0:00:00.725583
DEBUG:searx.searx.search.processor:Initialized wikidata
DEBUG:searx.search:actual_timeout=3.0 (default_timeout=3.0, ?timeout_limit=None, max_request_timeout=None)
DEBUG:httpx._client:HTTP Request: GET https://en.wikipedia.org/api/rest_v1/page/summary/Elasticsearch%20Google "HTTP/2 301 Moved Permanently"
DEBUG:searx.network.wikipedia:HTTP Request: GET https://en.wikipedia.org/api/rest_v1/page/summary/Elasticsearch%20Google "HTTP/2 301 Moved Permanently"
DEBUG:httpx._client:HTTP Request: GET https://www.bing.com/search?q=language%3AEN+elasticsearch+google&first=1 "HTTP/2 200 OK"
DEBUG:searx.network.bing:HTTP Request: GET https://www.bing.com/search?q=language%3AEN+elasticsearch+google&first=1 "HTTP/2 200 OK" (text/html; charset=utf-8)
DEBUG:httpx._client:HTTP Request: GET https://search.yahoo.com/search?p=elasticsearch+google&ei=UTF-8&fl=1&vl=lang_en&btf=&fr2=time&age=&b=1&xargs=0 "HTTP/2 200 OK"
DEBUG:searx.network.yahoo:HTTP Request: GET https://search.yahoo.com/search?p=elasticsearch+google&ei=UTF-8&fl=1&vl=lang_en&btf=&fr2=time&age=&b=1&xargs=0 "HTTP/2 200 OK" (text/html; charset=UTF-8)
DEBUG:httpx._client:HTTP Request: GET https://en.wikipedia.org/api/rest_v1/page/summary/Elasticsearch_Google "HTTP/2 404 Not Found"
DEBUG:searx.network.wikipedia:HTTP Request: GET https://en.wikipedia.org/api/rest_v1/page/summary/Elasticsearch_Google "HTTP/2 404 Not Found" (application/problem+json)
DEBUG:httpx._client:HTTP Request: POST https://query.wikidata.org/sparql "HTTP/2 200 OK"
DEBUG:searx.network.wikidata:HTTP Request: POST https://query.wikidata.org/sparql "HTTP/2 200 OK" (application/sparql-results+json;charset=utf-8)
/usr/local/searx/searx-src/searx/engines/yahoo.py:138: FutureWarning: The behavior of this method will change in future versions. Use specific 'len(elem)' or 'elem is not None' test instead.
  if content:
DEBUG:httpx._client:HTTP Request: POST https://lite.duckduckgo.com/lite "HTTP/2 200 OK"
DEBUG:searx.network.duckduckgo:HTTP Request: POST https://lite.duckduckgo.com/lite "HTTP/2 200 OK" (text/html; charset=UTF-8)
DEBUG:httpx._client:HTTP Request: GET https://duckduckgo.com/t/sl_l "HTTP/2 200 OK"
DEBUG:searx.network.duckduckgo:HTTP Request: GET https://duckduckgo.com/t/sl_l "HTTP/2 200 OK" (image/gif)
DEBUG:searx.webapp:https%3A//searx.ericaftereric.top/search%3Fq%3Delasticsearch%2Bgoogle uses locale `zh` from preferences
^CINFO:  try to disable debug mode ...
cd /usr/local/searx/searx-src
sed -i -e "s/debug : True/debug : False/g" "/etc/searx/settings.yml"
INFO:  restart uWSGI service
```


Discussion:

Resolving patch:
diff --git a/searx/engines/yahoo.py b/searx/engines/yahoo.py
--- a/searx/engines/yahoo.py
+++ b/searx/engines/yahoo.py
@@ -143,7 +143,7 @@ def response(resp):
                         'title': title,
                         'content': content})
 
-    for suggestion in eval_xpath_list(dom, '//div[contains(@class, "AlsoTry")]'):
+    for suggestion in eval_xpath_list(dom, '//div[contains(@class, "AlsoTry")]//table//a'):
         # append suggestion
         results.append({'suggestion': extract_text(suggestion)})
 


Test patch: