Browse Source

Add icons and badge for the themes

Add kickass in engine list
Add content for the result from kickass
Cqoicebordel 10 years ago
parent
commit
e623ee593a

+ 3
- 2
searx/engines/kickass.py View File

@@ -13,6 +13,7 @@ from cgi import escape
13 13
 from urllib import quote
14 14
 from lxml import html
15 15
 from operator import itemgetter
16
+from dateutil import parser
16 17
 
17 18
 # engine dependent config
18 19
 categories = ['videos', 'music', 'files']
@@ -52,7 +53,7 @@ def response(resp):
52 53
         link = result.xpath('.//a[@class="cellMainLink"]')[0]
53 54
         href = urljoin(url, link.attrib['href'])
54 55
         title = ' '.join(link.xpath('.//text()'))
55
-        #content = escape(' '.join(result.xpath(content_xpath)))
56
+        content = escape(html.tostring(result.xpath('.//span[@class="font11px lightgrey block"]')[0], method="text"))
56 57
         seed = result.xpath('.//td[contains(@class, "green")]/text()')[0]
57 58
         leech = result.xpath('.//td[contains(@class, "red")]/text()')[0]
58 59
 
@@ -73,7 +74,7 @@ def response(resp):
73 74
         # append result
74 75
         results.append({'url': href,
75 76
                         'title': title,
76
-                        'content': '',
77
+                        'content': content,
77 78
                         'seed': seed,
78 79
                         'leech': leech,
79 80
                         'magnetlink': magnetlink,

BIN
searx/static/courgette/img/icon_kickass.ico View File


BIN
searx/static/default/img/icon_kickass.ico View File


BIN
searx/static/oscar/img/icons/kickass.png View File


+ 1
- 1
searx/webapp.py View File

@@ -70,7 +70,7 @@ babel = Babel(app)
70 70
 
71 71
 #TODO configurable via settings.yml
72 72
 favicons = ['wikipedia', 'youtube', 'vimeo', 'dailymotion', 'soundcloud',
73
-            'twitter', 'stackoverflow', 'github', 'deviantart']
73
+            'twitter', 'stackoverflow', 'github', 'deviantart', 'kickass']
74 74
 
75 75
 cookie_max_age = 60 * 60 * 24 * 365 * 23  # 23 years
76 76