Browse Source

update versions.cfg to use the current up-to-date packages

Alexandre Flament 10 years ago
parent
commit
4689fe341c

+ 1
- 1
searx/autocomplete.py View File

@@ -28,7 +28,7 @@ from searx.poolrequests import get as http_get
28 28
 
29 29
 
30 30
 def get(*args, **kwargs):
31
-    if not 'timeout' in kwargs:
31
+    if 'timeout' not in kwargs:
32 32
         kwargs['timeout'] = settings['server']['request_timeout']
33 33
 
34 34
     return http_get(*args, **kwargs)

+ 2
- 2
searx/engines/__init__.py View File

@@ -86,7 +86,7 @@ def load_engine(engine_data):
86 86
             continue
87 87
         if getattr(engine, engine_attr) is None:
88 88
             logger.error('Missing engine config attribute: "{0}.{1}"'
89
-                  .format(engine.name, engine_attr))
89
+                         .format(engine.name, engine_attr))
90 90
             sys.exit(1)
91 91
 
92 92
     engine.stats = {
@@ -106,7 +106,7 @@ def load_engine(engine_data):
106 106
     if engine.shortcut:
107 107
         if engine.shortcut in engine_shortcuts:
108 108
             logger.error('Engine config error: ambigious shortcut: {0}'
109
-                  .format(engine.shortcut))
109
+                         .format(engine.shortcut))
110 110
             sys.exit(1)
111 111
         engine_shortcuts[engine.shortcut] = engine.name
112 112
     return engine

+ 14
- 12
searx/engines/bing.py View File

@@ -1,15 +1,17 @@
1
-## Bing (Web)
2
-#
3
-# @website     https://www.bing.com
4
-# @provide-api yes (http://datamarket.azure.com/dataset/bing/search),
5
-#              max. 5000 query/month
6
-#
7
-# @using-api   no (because of query limit)
8
-# @results     HTML (using search portal)
9
-# @stable      no (HTML can change)
10
-# @parse       url, title, content
11
-#
12
-# @todo        publishedDate
1
+"""
2
+ Bing (Web)
3
+
4
+ @website     https://www.bing.com
5
+ @provide-api yes (http://datamarket.azure.com/dataset/bing/search),
6
+              max. 5000 query/month
7
+
8
+ @using-api   no (because of query limit)
9
+ @results     HTML (using search portal)
10
+ @stable      no (HTML can change)
11
+ @parse       url, title, content
12
+
13
+ @todo        publishedDate
14
+"""
13 15
 
14 16
 from urllib import urlencode
15 17
 from cgi import escape

+ 17
- 15
searx/engines/bing_images.py View File

@@ -1,17 +1,19 @@
1
-## Bing (Images)
2
-#
3
-# @website     https://www.bing.com/images
4
-# @provide-api yes (http://datamarket.azure.com/dataset/bing/search),
5
-#              max. 5000 query/month
6
-#
7
-# @using-api   no (because of query limit)
8
-# @results     HTML (using search portal)
9
-# @stable      no (HTML can change)
10
-# @parse       url, title, img_src
11
-#
12
-# @todo        currently there are up to 35 images receive per page,
13
-#              because bing does not parse count=10.
14
-#              limited response to 10 images
1
+"""
2
+ Bing (Images)
3
+
4
+ @website     https://www.bing.com/images
5
+ @provide-api yes (http://datamarket.azure.com/dataset/bing/search),
6
+              max. 5000 query/month
7
+
8
+ @using-api   no (because of query limit)
9
+ @results     HTML (using search portal)
10
+ @stable      no (HTML can change)
11
+ @parse       url, title, img_src
12
+
13
+ @todo        currently there are up to 35 images receive per page,
14
+              because bing does not parse count=10.
15
+              limited response to 10 images
16
+"""
15 17
 
16 18
 from urllib import urlencode
17 19
 from lxml import html
@@ -76,7 +78,7 @@ def response(resp):
76 78
         title = link.attrib.get('t1')
77 79
         ihk = link.attrib.get('ihk')
78 80
 
79
-        #url = 'http://' + link.attrib.get('t3')
81
+        # url = 'http://' + link.attrib.get('t3')
80 82
         url = yaml_data.get('surl')
81 83
         img_src = yaml_data.get('imgurl')
82 84
 

+ 14
- 10
searx/engines/bing_news.py View File

@@ -1,13 +1,15 @@
1
-## Bing (News)
2
-#
3
-# @website     https://www.bing.com/news
4
-# @provide-api yes (http://datamarket.azure.com/dataset/bing/search),
5
-#              max. 5000 query/month
6
-#
7
-# @using-api   no (because of query limit)
8
-# @results     HTML (using search portal)
9
-# @stable      no (HTML can change)
10
-# @parse       url, title, content, publishedDate
1
+"""
2
+ Bing (News)
3
+
4
+ @website     https://www.bing.com/news
5
+ @provide-api yes (http://datamarket.azure.com/dataset/bing/search),
6
+              max. 5000 query/month
7
+
8
+ @using-api   no (because of query limit)
9
+ @results     HTML (using search portal)
10
+ @stable      no (HTML can change)
11
+ @parse       url, title, content, publishedDate
12
+"""
11 13
 
12 14
 from urllib import urlencode
13 15
 from cgi import escape
@@ -87,6 +89,8 @@ def response(resp):
87 89
                 publishedDate = parser.parse(publishedDate, dayfirst=False)
88 90
             except TypeError:
89 91
                 publishedDate = datetime.now()
92
+            except ValueError:
93
+                publishedDate = datetime.now()
90 94
 
91 95
         # append result
92 96
         results.append({'url': url,

+ 11
- 9
searx/engines/blekko_images.py View File

@@ -1,12 +1,14 @@
1
-## Blekko (Images)
2
-#
3
-# @website     https://blekko.com
4
-# @provide-api yes (inofficial)
5
-#
6
-# @using-api   yes
7
-# @results     JSON
8
-# @stable      yes
9
-# @parse       url, title, img_src
1
+"""
2
+ Blekko (Images)
3
+
4
+ @website     https://blekko.com
5
+ @provide-api yes (inofficial)
6
+
7
+ @using-api   yes
8
+ @results     JSON
9
+ @stable      yes
10
+ @parse       url, title, img_src
11
+"""
10 12
 
11 13
 from json import loads
12 14
 from urllib import urlencode

+ 11
- 9
searx/engines/btdigg.py View File

@@ -1,12 +1,14 @@
1
-## BTDigg (Videos, Music, Files)
2
-#
3
-# @website     https://btdigg.org
4
-# @provide-api yes (on demand)
5
-#
6
-# @using-api   no
7
-# @results     HTML (using search portal)
8
-# @stable      no (HTML can change)
9
-# @parse       url, title, content, seed, leech, magnetlink
1
+"""
2
+ BTDigg (Videos, Music, Files)
3
+
4
+ @website     https://btdigg.org
5
+ @provide-api yes (on demand)
6
+
7
+ @using-api   no
8
+ @results     HTML (using search portal)
9
+ @stable      no (HTML can change)
10
+ @parse       url, title, content, seed, leech, magnetlink
11
+"""
10 12
 
11 13
 from urlparse import urljoin
12 14
 from cgi import escape

+ 14
- 12
searx/engines/dailymotion.py View File

@@ -1,14 +1,16 @@
1
-## Dailymotion (Videos)
2
-#
3
-# @website     https://www.dailymotion.com
4
-# @provide-api yes (http://www.dailymotion.com/developer)
5
-#
6
-# @using-api   yes
7
-# @results     JSON
8
-# @stable      yes
9
-# @parse       url, title, thumbnail, publishedDate, embedded
10
-#
11
-# @todo        set content-parameter with correct data
1
+"""
2
+ Dailymotion (Videos)
3
+
4
+ @website     https://www.dailymotion.com
5
+ @provide-api yes (http://www.dailymotion.com/developer)
6
+
7
+ @using-api   yes
8
+ @results     JSON
9
+ @stable      yes
10
+ @parse       url, title, thumbnail, publishedDate, embedded
11
+
12
+ @todo        set content-parameter with correct data
13
+"""
12 14
 
13 15
 from urllib import urlencode
14 16
 from json import loads
@@ -48,7 +50,7 @@ def response(resp):
48 50
     search_res = loads(resp.text)
49 51
 
50 52
     # return empty array if there are no results
51
-    if not 'list' in search_res:
53
+    if 'list' not in search_res:
52 54
         return []
53 55
 
54 56
     # parse results

+ 11
- 9
searx/engines/deezer.py View File

@@ -1,12 +1,14 @@
1
-## Deezer (Music)
2
-#
3
-# @website     https://deezer.com
4
-# @provide-api yes (http://developers.deezer.com/api/)
5
-#
6
-# @using-api   yes
7
-# @results     JSON
8
-# @stable      yes
9
-# @parse       url, title, content, embedded
1
+"""
2
+ Deezer (Music)
3
+
4
+ @website     https://deezer.com
5
+ @provide-api yes (http://developers.deezer.com/api/)
6
+
7
+ @using-api   yes
8
+ @results     JSON
9
+ @stable      yes
10
+ @parse       url, title, content, embedded
11
+"""
10 12
 
11 13
 from json import loads
12 14
 from urllib import urlencode

+ 13
- 11
searx/engines/deviantart.py View File

@@ -1,14 +1,16 @@
1
-## Deviantart (Images)
2
-#
3
-# @website     https://www.deviantart.com/
4
-# @provide-api yes (https://www.deviantart.com/developers/) (RSS)
5
-#
6
-# @using-api   no (TODO, rewrite to api)
7
-# @results     HTML
8
-# @stable      no (HTML can change)
9
-# @parse       url, title, thumbnail_src, img_src
10
-#
11
-# @todo        rewrite to api
1
+"""
2
+ Deviantart (Images)
3
+
4
+ @website     https://www.deviantart.com/
5
+ @provide-api yes (https://www.deviantart.com/developers/) (RSS)
6
+
7
+ @using-api   no (TODO, rewrite to api)
8
+ @results     HTML
9
+ @stable      no (HTML can change)
10
+ @parse       url, title, thumbnail_src, img_src
11
+
12
+ @todo        rewrite to api
13
+"""
12 14
 
13 15
 from urllib import urlencode
14 16
 from urlparse import urljoin

+ 11
- 9
searx/engines/digg.py View File

@@ -1,12 +1,14 @@
1
-## Digg (News, Social media)
2
-#
3
-# @website     https://digg.com/
4
-# @provide-api no
5
-#
6
-# @using-api   no
7
-# @results     HTML (using search portal)
8
-# @stable      no (HTML can change)
9
-# @parse       url, title, content, publishedDate, thumbnail
1
+"""
2
+ Digg (News, Social media)
3
+
4
+ @website     https://digg.com/
5
+ @provide-api no
6
+
7
+ @using-api   no
8
+ @results     HTML (using search portal)
9
+ @stable      no (HTML can change)
10
+ @parse       url, title, content, publishedDate, thumbnail
11
+"""
10 12
 
11 13
 from urllib import quote_plus
12 14
 from json import loads

+ 16
- 14
searx/engines/duckduckgo.py View File

@@ -1,17 +1,19 @@
1
-## DuckDuckGo (Web)
2
-#
3
-# @website     https://duckduckgo.com/
4
-# @provide-api yes (https://duckduckgo.com/api),
5
-#              but not all results from search-site
6
-#
7
-# @using-api   no
8
-# @results     HTML (using search portal)
9
-# @stable      no (HTML can change)
10
-# @parse       url, title, content
11
-#
12
-# @todo        rewrite to api
13
-# @todo        language support
14
-#              (the current used site does not support language-change)
1
+"""
2
+ DuckDuckGo (Web)
3
+
4
+ @website     https://duckduckgo.com/
5
+ @provide-api yes (https://duckduckgo.com/api),
6
+              but not all results from search-site
7
+
8
+ @using-api   no
9
+ @results     HTML (using search portal)
10
+ @stable      no (HTML can change)
11
+ @parse       url, title, content
12
+
13
+ @todo        rewrite to api
14
+ @todo        language support
15
+              (the current used site does not support language-change)
16
+"""
15 17
 
16 18
 from urllib import urlencode
17 19
 from lxml.html import fromstring

+ 6
- 4
searx/engines/dummy.py View File

@@ -1,7 +1,9 @@
1
-## Dummy
2
-#
3
-# @results     empty array
4
-# @stable      yes
1
+"""
2
+ Dummy
3
+
4
+ @results     empty array
5
+ @stable      yes
6
+"""
5 7
 
6 8
 
7 9
 # do search-request

+ 11
- 9
searx/engines/faroo.py View File

@@ -1,12 +1,14 @@
1
-## Faroo (Web, News)
2
-#
3
-# @website     http://www.faroo.com
4
-# @provide-api yes (http://www.faroo.com/hp/api/api.html), require API-key
5
-#
6
-# @using-api   yes
7
-# @results     JSON
8
-# @stable      yes
9
-# @parse       url, title, content, publishedDate, img_src
1
+"""
2
+ Faroo (Web, News)
3
+
4
+ @website     http://www.faroo.com
5
+ @provide-api yes (http://www.faroo.com/hp/api/api.html), require API-key
6
+
7
+ @using-api   yes
8
+ @results     JSON
9
+ @stable      yes
10
+ @parse       url, title, content, publishedDate, img_src
11
+"""
10 12
 
11 13
 from urllib import urlencode
12 14
 from json import loads

+ 14
- 12
searx/engines/flickr.py View File

@@ -1,15 +1,17 @@
1 1
 #!/usr/bin/env python
2 2
 
3
-## Flickr (Images)
4
-#
5
-# @website     https://www.flickr.com
6
-# @provide-api yes (https://secure.flickr.com/services/api/flickr.photos.search.html)
7
-#
8
-# @using-api   yes
9
-# @results     JSON
10
-# @stable      yes
11
-# @parse       url, title, thumbnail, img_src
12
-#More info on api-key : https://www.flickr.com/services/apps/create/
3
+"""
4
+ Flickr (Images)
5
+
6
+ @website     https://www.flickr.com
7
+ @provide-api yes (https://secure.flickr.com/services/api/flickr.photos.search.html)
8
+
9
+ @using-api   yes
10
+ @results     JSON
11
+ @stable      yes
12
+ @parse       url, title, thumbnail, img_src
13
+ More info on api-key : https://www.flickr.com/services/apps/create/
14
+"""
13 15
 
14 16
 from urllib import urlencode
15 17
 from json import loads
@@ -48,10 +50,10 @@ def response(resp):
48 50
     search_results = loads(resp.text)
49 51
 
50 52
     # return empty array if there are no results
51
-    if not 'photos' in search_results:
53
+    if 'photos' not in search_results:
52 54
         return []
53 55
 
54
-    if not 'photo' in search_results['photos']:
56
+    if 'photo' not in search_results['photos']:
55 57
         return []
56 58
 
57 59
     photos = search_results['photos']['photo']

+ 13
- 11
searx/engines/flickr_noapi.py View File

@@ -1,14 +1,16 @@
1 1
 #!/usr/bin/env python
2 2
 
3
-#  Flickr (Images)
4
-#
5
-# @website     https://www.flickr.com
6
-# @provide-api yes (https://secure.flickr.com/services/api/flickr.photos.search.html)
7
-#
8
-# @using-api   no
9
-# @results     HTML
10
-# @stable      no
11
-# @parse       url, title, thumbnail, img_src
3
+"""
4
+  Flickr (Images)
5
+
6
+ @website     https://www.flickr.com
7
+ @provide-api yes (https://secure.flickr.com/services/api/flickr.photos.search.html)
8
+
9
+ @using-api   no
10
+ @results     HTML
11
+ @stable      no
12
+ @parse       url, title, thumbnail, img_src
13
+"""
12 14
 
13 15
 from urllib import urlencode
14 16
 from json import loads
@@ -20,8 +22,8 @@ logger = logger.getChild('flickr-noapi')
20 22
 
21 23
 categories = ['images']
22 24
 
23
-url = 'https://secure.flickr.com/'
24
-search_url = url + 'search/?{query}&page={page}'
25
+url = 'https://www.flickr.com/'
26
+search_url = url + 'search?{query}&page={page}'
25 27
 photo_url = 'https://www.flickr.com/photos/{userid}/{photoid}'
26 28
 regex = re.compile(r"\"search-photos-models\",\"photos\":(.*}),\"totalItems\":", re.DOTALL)
27 29
 image_sizes = ('o', 'k', 'h', 'b', 'c', 'z', 'n', 'm', 't', 'q', 's')

+ 13
- 11
searx/engines/generalfile.py View File

@@ -1,14 +1,16 @@
1
-## General Files (Files)
2
-#
3
-# @website     http://www.general-files.org
4
-# @provide-api no (nothing found)
5
-#
6
-# @using-api   no (because nothing found)
7
-# @results     HTML (using search portal)
8
-# @stable      no (HTML can change)
9
-# @parse       url, title, content
10
-#
11
-# @todo        detect torrents?
1
+"""
2
+ General Files (Files)
3
+
4
+ @website     http://www.general-files.org
5
+ @provide-api no (nothing found)
6
+
7
+ @using-api   no (because nothing found)
8
+ @results     HTML (using search portal)
9
+ @stable      no (HTML can change)
10
+ @parse       url, title, content
11
+
12
+ @todo        detect torrents?
13
+"""
12 14
 
13 15
 from lxml import html
14 16
 

+ 11
- 9
searx/engines/gigablast.py View File

@@ -1,12 +1,14 @@
1
-## Gigablast (Web)
2
-#
3
-# @website     http://gigablast.com
4
-# @provide-api yes (http://gigablast.com/api.html)
5
-#
6
-# @using-api   yes
7
-# @results     XML
8
-# @stable      yes
9
-# @parse       url, title, content
1
+"""
2
+ Gigablast (Web)
3
+
4
+ @website     http://gigablast.com
5
+ @provide-api yes (http://gigablast.com/api.html)
6
+
7
+ @using-api   yes
8
+ @results     XML
9
+ @stable      yes
10
+ @parse       url, title, content
11
+"""
10 12
 
11 13
 from urllib import urlencode
12 14
 from cgi import escape

+ 12
- 10
searx/engines/github.py View File

@@ -1,12 +1,14 @@
1
-## Github (It)
2
-#
3
-# @website     https://github.com/
4
-# @provide-api yes (https://developer.github.com/v3/)
5
-#
6
-# @using-api   yes
7
-# @results     JSON
8
-# @stable      yes (using api)
9
-# @parse       url, title, content
1
+"""
2
+ Github (It)
3
+
4
+ @website     https://github.com/
5
+ @provide-api yes (https://developer.github.com/v3/)
6
+
7
+ @using-api   yes
8
+ @results     JSON
9
+ @stable      yes (using api)
10
+ @parse       url, title, content
11
+"""
10 12
 
11 13
 from urllib import urlencode
12 14
 from json import loads
@@ -37,7 +39,7 @@ def response(resp):
37 39
     search_res = loads(resp.text)
38 40
 
39 41
     # check if items are recieved
40
-    if not 'items' in search_res:
42
+    if 'items' not in search_res:
41 43
         return []
42 44
 
43 45
     # parse results

+ 12
- 10
searx/engines/google_images.py View File

@@ -1,13 +1,15 @@
1
-## Google (Images)
2
-#
3
-# @website     https://www.google.com
4
-# @provide-api yes (https://developers.google.com/web-search/docs/),
5
-#              deprecated!
6
-#
7
-# @using-api   yes
8
-# @results     JSON
9
-# @stable      yes (but deprecated)
10
-# @parse       url, title, img_src
1
+"""
2
+ Google (Images)
3
+
4
+ @website     https://www.google.com
5
+ @provide-api yes (https://developers.google.com/web-search/docs/),
6
+              deprecated!
7
+
8
+ @using-api   yes
9
+ @results     JSON
10
+ @stable      yes (but deprecated)
11
+ @parse       url, title, img_src
12
+"""
11 13
 
12 14
 from urllib import urlencode, unquote
13 15
 from json import loads

+ 12
- 10
searx/engines/google_news.py View File

@@ -1,13 +1,15 @@
1
-## Google (News)
2
-#
3
-# @website     https://www.google.com
4
-# @provide-api yes (https://developers.google.com/web-search/docs/),
5
-#              deprecated!
6
-#
7
-# @using-api   yes
8
-# @results     JSON
9
-# @stable      yes (but deprecated)
10
-# @parse       url, title, content, publishedDate
1
+"""
2
+ Google (News)
3
+
4
+ @website     https://www.google.com
5
+ @provide-api yes (https://developers.google.com/web-search/docs/),
6
+              deprecated!
7
+
8
+ @using-api   yes
9
+ @results     JSON
10
+ @stable      yes (but deprecated)
11
+ @parse       url, title, content, publishedDate
12
+"""
11 13
 
12 14
 from urllib import urlencode
13 15
 from json import loads

+ 1
- 1
searx/engines/json_engine.py View File

@@ -6,7 +6,7 @@ search_url = None
6 6
 url_query = None
7 7
 content_query = None
8 8
 title_query = None
9
-#suggestion_xpath = ''
9
+# suggestion_xpath = ''
10 10
 
11 11
 
12 12
 def iterate(iterable):

+ 11
- 9
searx/engines/kickass.py View File

@@ -1,12 +1,14 @@
1
-## Kickass Torrent (Videos, Music, Files)
2
-#
3
-# @website     https://kickass.so
4
-# @provide-api no (nothing found)
5
-#
6
-# @using-api   no
7
-# @results     HTML (using search portal)
8
-# @stable      yes (HTML can change)
9
-# @parse       url, title, content, seed, leech, magnetlink
1
+"""
2
+ Kickass Torrent (Videos, Music, Files)
3
+
4
+ @website     https://kickass.so
5
+ @provide-api no (nothing found)
6
+
7
+ @using-api   no
8
+ @results     HTML (using search portal)
9
+ @stable      yes (HTML can change)
10
+ @parse       url, title, content, seed, leech, magnetlink
11
+"""
10 12
 
11 13
 from urlparse import urljoin
12 14
 from cgi import escape

+ 13
- 11
searx/engines/mediawiki.py View File

@@ -1,14 +1,16 @@
1
-## general mediawiki-engine (Web)
2
-#
3
-# @website     websites built on mediawiki (https://www.mediawiki.org)
4
-# @provide-api yes (http://www.mediawiki.org/wiki/API:Search)
5
-#
6
-# @using-api   yes
7
-# @results     JSON
8
-# @stable      yes
9
-# @parse       url, title
10
-#
11
-# @todo        content
1
+"""
2
+ general mediawiki-engine (Web)
3
+
4
+ @website     websites built on mediawiki (https://www.mediawiki.org)
5
+ @provide-api yes (http://www.mediawiki.org/wiki/API:Search)
6
+
7
+ @using-api   yes
8
+ @results     JSON
9
+ @stable      yes
10
+ @parse       url, title
11
+
12
+ @todo        content
13
+"""
12 14
 
13 15
 from json import loads
14 16
 from string import Formatter

+ 11
- 9
searx/engines/mixcloud.py View File

@@ -1,12 +1,14 @@
1
-## Mixcloud (Music)
2
-#
3
-# @website     https://http://www.mixcloud.com/
4
-# @provide-api yes (http://www.mixcloud.com/developers/
5
-#
6
-# @using-api   yes
7
-# @results     JSON
8
-# @stable      yes
9
-# @parse       url, title, content, embedded, publishedDate
1
+"""
2
+ Mixcloud (Music)
3
+
4
+ @website     https://http://www.mixcloud.com/
5
+ @provide-api yes (http://www.mixcloud.com/developers/
6
+
7
+ @using-api   yes
8
+ @results     JSON
9
+ @stable      yes
10
+ @parse       url, title, content, embedded, publishedDate
11
+"""
10 12
 
11 13
 from json import loads
12 14
 from urllib import urlencode

+ 11
- 9
searx/engines/openstreetmap.py View File

@@ -1,12 +1,14 @@
1
-## OpenStreetMap (Map)
2
-#
3
-# @website     https://openstreetmap.org/
4
-# @provide-api yes (http://wiki.openstreetmap.org/wiki/Nominatim)
5
-#
6
-# @using-api   yes
7
-# @results     JSON
8
-# @stable      yes
9
-# @parse       url, title
1
+"""
2
+ OpenStreetMap (Map)
3
+
4
+ @website     https://openstreetmap.org/
5
+ @provide-api yes (http://wiki.openstreetmap.org/wiki/Nominatim)
6
+
7
+ @using-api   yes
8
+ @results     JSON
9
+ @stable      yes
10
+ @parse       url, title
11
+"""
10 12
 
11 13
 from json import loads
12 14
 from searx.utils import searx_useragent

+ 11
- 9
searx/engines/photon.py View File

@@ -1,12 +1,14 @@
1
-## Photon (Map)
2
-#
3
-# @website     https://photon.komoot.de
4
-# @provide-api yes (https://photon.komoot.de/)
5
-#
6
-# @using-api   yes
7
-# @results     JSON
8
-# @stable      yes
9
-# @parse       url, title
1
+"""
2
+ Photon (Map)
3
+
4
+ @website     https://photon.komoot.de
5
+ @provide-api yes (https://photon.komoot.de/)
6
+
7
+ @using-api   yes
8
+ @results     JSON
9
+ @stable      yes
10
+ @parse       url, title
11
+"""
10 12
 
11 13
 from urllib import urlencode
12 14
 from json import loads

+ 11
- 9
searx/engines/searchcode_code.py View File

@@ -1,12 +1,14 @@
1
-## Searchcode (It)
2
-#
3
-# @website     https://searchcode.com/
4
-# @provide-api yes (https://searchcode.com/api/)
5
-#
6
-# @using-api   yes
7
-# @results     JSON
8
-# @stable      yes
9
-# @parse       url, title, content
1
+"""
2
+ Searchcode (It)
3
+
4
+ @website     https://searchcode.com/
5
+ @provide-api yes (https://searchcode.com/api/)
6
+
7
+ @using-api   yes
8
+ @results     JSON
9
+ @stable      yes
10
+ @parse       url, title, content
11
+"""
10 12
 
11 13
 from urllib import urlencode
12 14
 from json import loads

+ 11
- 9
searx/engines/searchcode_doc.py View File

@@ -1,12 +1,14 @@
1
-## Searchcode (It)
2
-#
3
-# @website     https://searchcode.com/
4
-# @provide-api yes (https://searchcode.com/api/)
5
-#
6
-# @using-api   yes
7
-# @results     JSON
8
-# @stable      yes
9
-# @parse       url, title, content
1
+"""
2
+ Searchcode (It)
3
+
4
+ @website     https://searchcode.com/
5
+ @provide-api yes (https://searchcode.com/api/)
6
+
7
+ @using-api   yes
8
+ @results     JSON
9
+ @stable      yes
10
+ @parse       url, title, content
11
+"""
10 12
 
11 13
 from urllib import urlencode
12 14
 from json import loads

+ 11
- 9
searx/engines/soundcloud.py View File

@@ -1,12 +1,14 @@
1
-## Soundcloud (Music)
2
-#
3
-# @website     https://soundcloud.com
4
-# @provide-api yes (https://developers.soundcloud.com/)
5
-#
6
-# @using-api   yes
7
-# @results     JSON
8
-# @stable      yes
9
-# @parse       url, title, content, publishedDate, embedded
1
+"""
2
+ Soundcloud (Music)
3
+
4
+ @website     https://soundcloud.com
5
+ @provide-api yes (https://developers.soundcloud.com/)
6
+
7
+ @using-api   yes
8
+ @results     JSON
9
+ @stable      yes
10
+ @parse       url, title, content, publishedDate, embedded
11
+"""
10 12
 
11 13
 from json import loads
12 14
 from urllib import urlencode, quote_plus

+ 11
- 9
searx/engines/spotify.py View File

@@ -1,12 +1,14 @@
1
-## Spotify (Music)
2
-#
3
-# @website     https://spotify.com
4
-# @provide-api yes (https://developer.spotify.com/web-api/search-item/)
5
-#
6
-# @using-api   yes
7
-# @results     JSON
8
-# @stable      yes
9
-# @parse       url, title, content, embedded
1
+"""
2
+ Spotify (Music)
3
+
4
+ @website     https://spotify.com
5
+ @provide-api yes (https://developer.spotify.com/web-api/search-item/)
6
+
7
+ @using-api   yes
8
+ @results     JSON
9
+ @stable      yes
10
+ @parse       url, title, content, embedded
11
+"""
10 12
 
11 13
 from json import loads
12 14
 from urllib import urlencode

+ 11
- 9
searx/engines/stackoverflow.py View File

@@ -1,12 +1,14 @@
1
-## Stackoverflow (It)
2
-#
3
-# @website     https://stackoverflow.com/
4
-# @provide-api not clear (https://api.stackexchange.com/docs/advanced-search)
5
-#
6
-# @using-api   no
7
-# @results     HTML
8
-# @stable      no (HTML can change)
9
-# @parse       url, title, content
1
+"""
2
+ Stackoverflow (It)
3
+
4
+ @website     https://stackoverflow.com/
5
+ @provide-api not clear (https://api.stackexchange.com/docs/advanced-search)
6
+
7
+ @using-api   no
8
+ @results     HTML
9
+ @stable      no (HTML can change)
10
+ @parse       url, title, content
11
+"""
10 12
 
11 13
 from urlparse import urljoin
12 14
 from cgi import escape

+ 11
- 9
searx/engines/subtitleseeker.py View File

@@ -1,12 +1,14 @@
1
-## Subtitleseeker (Video)
2
-#
3
-# @website     http://www.subtitleseeker.com
4
-# @provide-api no
5
-#
6
-# @using-api   no
7
-# @results     HTML
8
-# @stable      no (HTML can change)
9
-# @parse       url, title, content
1
+"""
2
+ Subtitleseeker (Video)
3
+
4
+ @website     http://www.subtitleseeker.com
5
+ @provide-api no
6
+
7
+ @using-api   no
8
+ @results     HTML
9
+ @stable      no (HTML can change)
10
+ @parse       url, title, content
11
+"""
10 12
 
11 13
 from cgi import escape
12 14
 from urllib import quote_plus

+ 13
- 11
searx/engines/twitter.py View File

@@ -1,14 +1,16 @@
1
-## Twitter (Social media)
2
-#
3
-# @website     https://twitter.com/
4
-# @provide-api yes (https://dev.twitter.com/docs/using-search)
5
-#
6
-# @using-api   no
7
-# @results     HTML (using search portal)
8
-# @stable      no (HTML can change)
9
-# @parse       url, title, content
10
-#
11
-# @todo        publishedDate
1
+"""
2
+ Twitter (Social media)
3
+
4
+ @website     https://twitter.com/
5
+ @provide-api yes (https://dev.twitter.com/docs/using-search)
6
+
7
+ @using-api   no
8
+ @results     HTML (using search portal)
9
+ @stable      no (HTML can change)
10
+ @parse       url, title, content
11
+
12
+ @todo        publishedDate
13
+"""
12 14
 
13 15
 from urlparse import urljoin
14 16
 from urllib import urlencode

+ 10
- 9
searx/engines/www1x.py View File

@@ -1,13 +1,14 @@
1
-## 1x (Images)
2
-#
3
-# @website     http://1x.com/
4
-# @provide-api no
5
-#
6
-# @using-api   no
7
-# @results     HTML
8
-# @stable      no (HTML can change)
9
-# @parse       url, title, thumbnail, img_src, content
1
+"""
2
+ 1x (Images)
10 3
 
4
+ @website     http://1x.com/
5
+ @provide-api no
6
+
7
+ @using-api   no
8
+ @results     HTML
9
+ @stable      no (HTML can change)
10
+ @parse       url, title, thumbnail, img_src, content
11
+"""
11 12
 
12 13
 from urllib import urlencode
13 14
 from urlparse import urljoin

+ 13
- 11
searx/engines/www500px.py View File

@@ -1,14 +1,16 @@
1
-## 500px (Images)
2
-#
3
-# @website     https://500px.com
4
-# @provide-api yes (https://developers.500px.com/)
5
-#
6
-# @using-api   no
7
-# @results     HTML
8
-# @stable      no (HTML can change)
9
-# @parse       url, title, thumbnail, img_src, content
10
-#
11
-# @todo        rewrite to api
1
+"""
2
+ 500px (Images)
3
+
4
+ @website     https://500px.com
5
+ @provide-api yes (https://developers.500px.com/)
6
+
7
+ @using-api   no
8
+ @results     HTML
9
+ @stable      no (HTML can change)
10
+ @parse       url, title, thumbnail, img_src, content
11
+
12
+ @todo        rewrite to api
13
+"""
12 14
 
13 15
 
14 16
 from urllib import urlencode

+ 1
- 1
searx/engines/yacy.py View File

@@ -1,4 +1,4 @@
1
-## Yacy (Web, Images, Videos, Music, Files)
1
+# Yacy (Web, Images, Videos, Music, Files)
2 2
 #
3 3
 # @website     http://yacy.net
4 4
 # @provide-api yes

+ 12
- 10
searx/engines/yahoo.py View File

@@ -1,13 +1,15 @@
1
-## Yahoo (Web)
2
-#
3
-# @website     https://search.yahoo.com/web
4
-# @provide-api yes (https://developer.yahoo.com/boss/search/),
5
-#              $0.80/1000 queries
6
-#
7
-# @using-api   no (because pricing)
8
-# @results     HTML (using search portal)
9
-# @stable      no (HTML can change)
10
-# @parse       url, title, content, suggestion
1
+"""
2
+ Yahoo (Web)
3
+
4
+ @website     https://search.yahoo.com/web
5
+ @provide-api yes (https://developer.yahoo.com/boss/search/),
6
+              $0.80/1000 queries
7
+
8
+ @using-api   no (because pricing)
9
+ @results     HTML (using search portal)
10
+ @stable      no (HTML can change)
11
+ @parse       url, title, content, suggestion
12
+"""
11 13
 
12 14
 from urllib import urlencode
13 15
 from urlparse import unquote

+ 2
- 2
searx/engines/youtube.py View File

@@ -1,4 +1,4 @@
1
-## Youtube (Videos)
1
+# Youtube (Videos)
2 2
 #
3 3
 # @website     https://www.youtube.com/
4 4
 # @provide-api yes (http://gdata-samples-youtube-search-py.appspot.com/)
@@ -47,7 +47,7 @@ def response(resp):
47 47
     search_results = loads(resp.text)
48 48
 
49 49
     # return empty array if there are no results
50
-    if not 'feed' in search_results:
50
+    if 'feed' not in search_results:
51 51
         return []
52 52
 
53 53
     feed = search_results['feed']

+ 69
- 50
versions.cfg View File

@@ -2,96 +2,115 @@
2 2
 Babel = 1.3
3 3
 Flask = 0.10.1
4 4
 Flask-Babel = 0.9
5
-Jinja2 = 2.7.2
6
-MarkupSafe = 0.18
7
-Pygments = 2.0.1
8
-WebOb = 1.3.1
9
-WebTest = 2.0.11
10
-Werkzeug = 0.9.4
5
+Jinja2 = 2.7.3
6
+MarkupSafe = 0.23
7
+Pygments = 2.0.2
8
+WebOb = 1.4.1
9
+WebTest = 2.0.18
10
+Werkzeug = 0.10.4
11 11
 buildout-versions = 1.7
12 12
 collective.recipe.omelette = 0.16
13 13
 coverage = 3.7.1
14
-decorator = 3.4.0
15
-docutils = 0.11
16
-flake8 = 2.1.0
17
-itsdangerous = 0.23
18
-mccabe = 0.2.1
14
+decorator = 3.4.2
15
+docutils = 0.12
16
+flake8 = 2.4.0
17
+itsdangerous = 0.24
18
+mccabe = 0.3
19 19
 mock = 1.0.1
20
-pep8 = 1.4.6
21
-plone.testing = 4.0.8
22
-pyflakes = 0.7.3
23
-pytz = 2013b
24
-pyyaml = 3.10
25
-requests = 2.5.3
20
+pep8 = 1.5.7
21
+plone.testing = 4.0.13
22
+pyflakes = 0.8.1
23
+pytz = 2015.2
24
+pyyaml = 3.11
25
+requests = 2.6.2
26 26
 robotframework-debuglibrary = 0.3
27 27
 robotframework-httplibrary = 0.4.2
28
-robotframework-selenium2library = 1.5.0
29
-robotsuite = 1.4.2
30
-selenium = 2.39.0
28
+robotframework-selenium2library = 1.6.0
29
+robotsuite = 1.6.1
30
+selenium = 2.45.0
31 31
 speaklater = 1.3
32
-unittest2 = 0.5.1
33
-waitress = 0.8.8
32
+unittest2 = 1.0.1
33
+waitress = 0.8.9
34 34
 zc.recipe.testrunner = 2.0.0
35 35
 pyopenssl = 0.15.1
36 36
 ndg-httpsclient = 0.3.3
37 37
 pyasn1 = 0.1.7
38 38
 pyasn1-modules = 0.0.5
39
-certifi = 14.05.14
39
+certifi = 2015.04.28
40
+
41
+# 
42
+cffi = 0.9.2
43
+cryptography = 0.8.2
40 44
 
41 45
 # Required by:
42
-# WebTest==2.0.11
46
+# WebTest==2.0.18
43 47
 beautifulsoup4 = 4.3.2
44 48
 
45 49
 # Required by:
50
+# cryptography==0.8.2
51
+enum34 = 1.0.4
52
+
53
+# Required by:
46 54
 # robotframework-httplibrary==0.4.2
47
-jsonpatch = 1.3
55
+jsonpatch = 1.9
48 56
 
49 57
 # Required by:
50 58
 # robotframework-httplibrary==0.4.2
51
-jsonpointer = 1.1
59
+jsonpointer = 1.7
60
+
61
+# Required by:
62
+# traceback2==1.4.0
63
+linecache2 = 1.0.0
64
+
65
+# Required by:
66
+# robotsuite==1.6.1
67
+# searx==0.7.0
68
+lxml = 3.4.4
52 69
 
53 70
 # Required by:
54
-# robotsuite==1.4.2
55
-# searx==0.1
56
-lxml = 3.2.5
71
+# cffi==0.9.2
72
+pycparser = 2.12
73
+
74
+# Required by:
75
+# searx==0.7.0
76
+python-dateutil = 2.4.2
57 77
 
58 78
 # Required by:
59 79
 # robotframework-httplibrary==0.4.2
60
-robotframework = 2.8.3
80
+robotframework = 2.8.7
81
+
82
+# Required by:
83
+# searx==0.7.0
84
+# zope.exceptions==4.0.7
85
+# zope.interface==4.1.2
86
+# zope.testrunner==4.4.8
87
+setuptools = 15.2
61 88
 
62 89
 # Required by:
63
-# plone.testing==4.0.8
64
-# robotsuite==1.4.2
65
-# searx==0.1
66
-# zope.exceptions==4.0.6
67
-# zope.interface==4.0.5
68
-# zope.testrunner==4.4.1
69
-setuptools = 2.1
90
+# robotsuite==1.6.1
91
+# zope.testrunner==4.4.8
92
+six = 1.9.0
70 93
 
71 94
 # Required by:
72
-# zope.testrunner==4.4.1
73
-six = 1.6.1
95
+# unittest2==1.0.1
96
+traceback2 = 1.4.0
74 97
 
75 98
 # Required by:
76 99
 # collective.recipe.omelette==0.16
77 100
 zc.recipe.egg = 2.0.1
78 101
 
79 102
 # Required by:
80
-# zope.testrunner==4.4.1
81
-zope.exceptions = 4.0.6
103
+# zope.testrunner==4.4.8
104
+zope.exceptions = 4.0.7
82 105
 
83 106
 # Required by:
84
-# zope.testrunner==4.4.1
85
-zope.interface = 4.0.5
107
+# zope.testrunner==4.4.8
108
+zope.interface = 4.1.2
86 109
 
87 110
 # Required by:
88
-# plone.testing==4.0.8
89
-zope.testing = 4.1.2
111
+# plone.testing==4.0.13
112
+zope.testing = 4.1.3
90 113
 
91 114
 # Required by:
92 115
 # zc.recipe.testrunner==2.0.0
93
-zope.testrunner = 4.4.1
94
-
95
-# Required by:
96
-# searx==0.3.0
97
-python-dateutil = 2.2
116
+zope.testrunner = 4.4.8