summaryrefslogtreecommitdiff
path: root/searx/engines/startpage.py
diff options
context:
space:
mode:
Diffstat (limited to 'searx/engines/startpage.py')
-rw-r--r--searx/engines/startpage.py5
1 files changed, 1 insertions, 4 deletions
diff --git a/searx/engines/startpage.py b/searx/engines/startpage.py
index f1ff76292..5a6c570d1 100644
--- a/searx/engines/startpage.py
+++ b/searx/engines/startpage.py
@@ -1,7 +1,5 @@
from urllib import urlencode
from lxml import html
-from urlparse import urlparse
-from cgi import escape
base_url = None
search_url = None
@@ -20,11 +18,10 @@ def response(resp):
results = []
dom = html.fromstring(resp.content)
# ads xpath //div[@id="results"]/div[@id="sponsored"]//div[@class="result"]
- # not ads : div[@class="result"] are the direct childs of div[@id="results"]
+ # not ads: div[@class="result"] are the direct childs of div[@id="results"]
for result in dom.xpath('//div[@id="results"]/div[@class="result"]'):
link = result.xpath('.//h3/a')[0]
url = link.attrib.get('href')
- parsed_url = urlparse(url)
title = link.text_content()
content =''