on master help sign in
Add icons and badge for the themes

Add kickass in engine list Add content for the result from kickass

commite623ee593af95313c42c28e3db69a0e99974e692 authorCqoicebordel <Cqoicebordel@users.noreply.github.com> dateSun 14 Dec 2014, 23:27 (12 years ago) parent978b476
5 files changed+4−3
searx/engines/kickass.py+3−2 searx/static/courgette/img/icon_kickass.ico searx/static/default/img/icon_kickass.ico searx/static/oscar/img/icons/kickass.png searx/webapp.py+1−1
searx/engines/kickass.py+3−2
@@ -13,6 +13,7 @@ from cgi import escape
1313from urllib import quote
1414from lxml import html
1515from operator import itemgetter
16+from dateutil import parser
1617
1718# engine dependent config
1819categories = ['videos', 'music', 'files']
@@ -52,7 +53,7 @@ def response(resp):
5253 link = result.xpath('.//a[@class="cellMainLink"]')[0]
5354 href = urljoin(url, link.attrib['href'])
5455 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"))
5657 seed = result.xpath('.//td[contains(@class, "green")]/text()')[0]
5758 leech = result.xpath('.//td[contains(@class, "red")]/text()')[0]
5859
@@ -73,7 +74,7 @@ def response(resp):
7374 # append result
7475 results.append({'url': href,
7576 'title': title,
76− 'content': '',
77+ 'content': content,
7778 'seed': seed,
7879 'leech': leech,
7980 '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)
7070
7171#TODO configurable via settings.yml
7272favicons = ['wikipedia', 'youtube', 'vimeo', 'dailymotion', 'soundcloud',
73− 'twitter', 'stackoverflow', 'github', 'deviantart']
73+ 'twitter', 'stackoverflow', 'github', 'deviantart', 'kickass']
7474
7575cookie_max_age = 60 * 60 * 24 * 365 * 23 # 23 years
7676