浏览代码

update comments in autocomplete.py

* update comments
* add licence-header
Thomas Pointhuber 10 年前
父节点
当前提交
53dc92b0d7
共有 1 个文件被更改,包括 19 次插入1 次删除
  1. 19
    1
      searx/autocomplete.py

+ 19
- 1
searx/autocomplete.py 查看文件

1
+'''
2
+searx is free software: you can redistribute it and/or modify
3
+it under the terms of the GNU Affero General Public License as published by
4
+the Free Software Foundation, either version 3 of the License, or
5
+(at your option) any later version.
6
+
7
+searx is distributed in the hope that it will be useful,
8
+but WITHOUT ANY WARRANTY; without even the implied warranty of
9
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
10
+GNU Affero General Public License for more details.
11
+
12
+You should have received a copy of the GNU Affero General Public License
13
+along with searx. If not, see < http://www.gnu.org/licenses/ >.
14
+
15
+(C) 2013- by Adam Tauber, <asciimoo@gmail.com>
16
+'''
17
+
18
+
1
 from lxml import etree
19
 from lxml import etree
2
 from requests import get
20
 from requests import get
3
 from json import loads
21
 from json import loads
22
 
40
 
23
 
41
 
24
 def duckduckgo(query):
42
 def duckduckgo(query):
25
-    # wikipedia autocompleter
43
+    # duckduckgo autocompleter
26
     url = 'https://ac.duckduckgo.com/ac/?{0}&type=list'
44
     url = 'https://ac.duckduckgo.com/ac/?{0}&type=list'
27
 
45
 
28
     resp = loads(get(url.format(urlencode(dict(q=query)))).text)
46
     resp = loads(get(url.format(urlencode(dict(q=query)))).text)