1
0
mirror of https://github.com/searxng/searxng.git synced 2024-11-22 20:17:45 +01:00

[ehn] added ixquick engine, using startpage engine

This commit is contained in:
pw3t 2014-01-19 21:20:07 +01:00
parent 132681b3aa
commit a01042ae61
2 changed files with 15 additions and 3 deletions

View File

@ -1,8 +1,8 @@
from urllib import urlencode
from lxml import html
base_url = 'https://startpage.com/'
search_url = base_url+'do/search'
base_url = None
search_url = None
def request(query, params):
@ -24,6 +24,11 @@ def response(resp):
link = result.xpath('.//h3/a')[0]
url = link.attrib.get('href')
title = link.text_content()
content = result.xpath('./p[@class="desc"]')[0].text_content()
content =''
if len(result.xpath('./p[@class="desc"]')):
content = result.xpath('./p[@class="desc"]')[0].text_content()
results.append({'url': url, 'title': title, 'content': content})
return results

View File

@ -68,6 +68,13 @@ engines:
- name : startpage
engine : startpage
base_url : 'https://startpage.com/'
search_url : 'https://startpage.com/do/search'
- name : ixquick
engine : startpage
base_url : 'https://www.ixquick.com/'
search_url : 'https://www.ixquick.com/do/search'
- name : twitter
engine : twitter