Bladeren bron

[fix] improve result handling of startpage engine

Thomas Pointhuber 10 jaren geleden
bovenliggende
commit
23b9095cbf
1 gewijzigde bestanden met toevoegingen van 5 en 1 verwijderingen
  1. 5
    1
      searx/engines/startpage.py

+ 5
- 1
searx/engines/startpage.py Bestand weergeven

66
         url = link.attrib.get('href')
66
         url = link.attrib.get('href')
67
 
67
 
68
         # block google-ad url's
68
         # block google-ad url's
69
-        if re.match("^http(s|)://www.google.[a-z]+/aclk.*$", url):
69
+        if re.match("^http(s|)://(www\.)?google\.[a-z]+/aclk.*$", url):
70
+            continue
71
+
72
+        # block startpage search url's
73
+        if re.match("^http(s|)://(www\.)?startpage\.com/do/search\?.*$", url):
70
             continue
74
             continue
71
 
75
 
72
         title = escape(extract_text(link))
76
         title = escape(extract_text(link))