mirror of
https://github.com/searxng/searxng.git
synced 2024-11-22 19:01:00 +00:00
[fix] engine - brave don't show ads
This commit is contained in:
parent
b729542a66
commit
8bcca0e620
1 changed files with 1 additions and 1 deletions
|
@ -246,7 +246,7 @@ def _parse_search(resp):
|
||||||
|
|
||||||
url = eval_xpath_getindex(result, './/a[contains(@class, "h")]/@href', 0, default=None)
|
url = eval_xpath_getindex(result, './/a[contains(@class, "h")]/@href', 0, default=None)
|
||||||
title_tag = eval_xpath_getindex(result, './/div[contains(@class, "title")]', 0, default=None)
|
title_tag = eval_xpath_getindex(result, './/div[contains(@class, "title")]', 0, default=None)
|
||||||
if url is None or title_tag is None:
|
if url is None or title_tag is None or not urlparse(url).netloc: # partial url likely means it's an ad
|
||||||
continue
|
continue
|
||||||
|
|
||||||
content_tag = eval_xpath_getindex(result, './/div[@class="snippet-description"]', 0, default='')
|
content_tag = eval_xpath_getindex(result, './/div[@class="snippet-description"]', 0, default='')
|
||||||
|
|
Loading…
Reference in a new issue