mirror of
https://github.com/searxng/searxng.git
synced 2024-11-25 20:31:00 +00:00
[fix] brave.search - update result selectors to fit to new layout
Closes: https://github.com/searxng/searxng/issues/3167 Signed-off-by: Markus Heiser <markus.heiser@darmarit.de>
This commit is contained in:
parent
efbee96b1d
commit
c14b117121
1 changed files with 3 additions and 1 deletions
|
@ -260,7 +260,9 @@ def _parse_search(resp):
|
|||
for result in eval_xpath_list(dom, xpath_results):
|
||||
|
||||
url = eval_xpath_getindex(result, './/a[contains(@class, "h")]/@href', 0, default=None)
|
||||
title_tag = eval_xpath_getindex(result, './/div[contains(@class, "url")]', 0, default=None)
|
||||
title_tag = eval_xpath_getindex(
|
||||
result, './/a[contains(@class, "h")]//div[contains(@class, "title")]', 0, default=None
|
||||
)
|
||||
if url is None or title_tag is None or not urlparse(url).netloc: # partial url likely means it's an ad
|
||||
continue
|
||||
|
||||
|
|
Loading…
Reference in a new issue