From 8bcca0e620a4879ed37d530419f2da1a709c706e Mon Sep 17 00:00:00 2001 From: jazzzooo <38244149+jazzzooo@users.noreply.github.com> Date: Thu, 21 Sep 2023 06:30:00 -0700 Subject: [PATCH] [fix] engine - brave don't show ads --- searx/engines/brave.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/searx/engines/brave.py b/searx/engines/brave.py index 13e262fa3..c713ffe50 100644 --- a/searx/engines/brave.py +++ b/searx/engines/brave.py @@ -246,7 +246,7 @@ def _parse_search(resp): 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) - 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 content_tag = eval_xpath_getindex(result, './/div[@class="snippet-description"]', 0, default='')