on master help sign in
Add icons and badge for the themes
e623ee5Cqoicebordel
searx/engines/kickass.py+3−2
@@ -13,6 +13,7 @@ from cgi import escape
13from urllib import quote
13from urllib import quote
14from lxml import html
14from lxml import html
15from operator import itemgetter
15from operator import itemgetter
16+from dateutil import parser
16
17
17# engine dependent config
18# engine dependent config
18categories = ['videos', 'music', 'files']
19categories = ['videos', 'music', 'files']
@@ -52,7 +53,7 @@ def response(resp):
52 link = result.xpath('.//a[@class="cellMainLink"]')[0]
53 link = result.xpath('.//a[@class="cellMainLink"]')[0]
53 href = urljoin(url, link.attrib['href'])
54 href = urljoin(url, link.attrib['href'])
54 title = ' '.join(link.xpath('.//text()'))
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 seed = result.xpath('.//td[contains(@class, "green")]/text()')[0]
57 seed = result.xpath('.//td[contains(@class, "green")]/text()')[0]
57 leech = result.xpath('.//td[contains(@class, "red")]/text()')[0]
58 leech = result.xpath('.//td[contains(@class, "red")]/text()')[0]
58
59
@@ -73,7 +74,7 @@ def response(resp):
73 # append result
74 # append result
74 results.append({'url': href,
75 results.append({'url': href,
75 'title': title,
76 'title': title,
76− 'content': '',
77+ 'content': content,
77 'seed': seed,
78 'seed': seed,
78 'leech': leech,
79 'leech': leech,
79 'magnetlink': magnetlink,
80 'magnetlink': magnetlink,
searx/static/courgette/img/icon_kickass.iconew file

Binary file not shown.

searx/static/default/img/icon_kickass.iconew file

Binary file not shown.

searx/static/oscar/img/icons/kickass.pngnew file

Binary file not shown.

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