@@ -57,17 +57,17 @@ def searx_bang(full_query):
5757 # check if query starts with categorie name
5858 for categorie in categories:
5959 if categorie.startswith(engine_query):
60− results.append(first_char+'{categorie}'.format(categorie=categorie))
60+ results.append(first_char + '{categorie}'.format(categorie=categorie))
6161
6262 # check if query starts with engine name
6363 for engine in engines:
6464 if engine.startswith(engine_query.replace('_', ' ')):
65− results.append(first_char+'{engine}'.format(engine=engine.replace(' ', '_')))
65+ results.append(first_char + '{engine}'.format(engine=engine.replace(' ', '_')))
6666
6767 # check if query starts with engine shortcut
6868 for engine_shortcut in engine_shortcuts:
6969 if engine_shortcut.startswith(engine_query):
70− results.append(first_char+'{engine_shortcut}'.format(engine_shortcut=engine_shortcut))
70+ results.append(first_char + '{engine_shortcut}'.format(engine_shortcut=engine_shortcut))
7171
7272 # check if current query stats with :bang
7373 elif first_char == ':':
@@ -112,7 +112,7 @@ def searx_bang(full_query):
112112
113113def dbpedia(query):
114114 # dbpedia autocompleter, no HTTPS
115− autocomplete_url = 'http://lookup.dbpedia.org/api/search.asmx/KeywordSearch?' # noqa
115+ autocomplete_url = 'http://lookup.dbpedia.org/api/search.asmx/KeywordSearch?'
116116
117117 response = get(autocomplete_url
118118 + urlencode(dict(QueryString=query)))
@@ -139,7 +139,7 @@ def duckduckgo(query):
139139
140140def google(query):
141141 # google autocompleter
142− autocomplete_url = 'https://suggestqueries.google.com/complete/search?client=toolbar&' # noqa
142+ autocomplete_url = 'https://suggestqueries.google.com/complete/search?client=toolbar&'
143143
144144 response = get(autocomplete_url
145145 + urlencode(dict(q=query)))
@@ -153,9 +153,20 @@ def google(query):
153153 return results
154154
155155
156+def startpage(query):
157+ # wikipedia autocompleter
158+ url = 'https://startpage.com/do/suggest?{query}'
159+
160+ resp = get(url.format(query=urlencode({'query': query}))).text.split('\n')
161+ print resp
162+ if len(resp) > 1:
163+ return resp
164+ return []
165+
166+
156167def wikipedia(query):
157168 # wikipedia autocompleter
158− url = 'https://en.wikipedia.org/w/api.php?action=opensearch&{0}&limit=10&namespace=0&format=json' # noqa
169+ url = 'https://en.wikipedia.org/w/api.php?action=opensearch&{0}&limit=10&namespace=0&format=json'
159170
160171 resp = loads(get(url.format(urlencode(dict(search=query)))).text)
161172 if len(resp) > 1:
@@ -166,5 +177,6 @@ def wikipedia(query):
166177backends = {'dbpedia': dbpedia,
167178 'duckduckgo': duckduckgo,
168179 'google': google,
180+ 'startpage': startpage,
169181 'wikipedia': wikipedia
170182 }