logo

searx

My custom branche(s) on searx, a meta-search engine
commit: aaf5d506e51197603922d7b9d259c0f4e498f62b
parent: 8f48c518aa049a37e6e7721cb17ceef92c519ca8
Author: Adam Tauber <asciimoo@gmail.com>
Date:   Wed, 21 Sep 2016 10:36:42 +0200

Merge pull request #702 from a01200356/digbt

[fix] results with digbit don't truncate anymore

Diffstat:

Msearx/engines/digbt.py2+-
Mtests/unit/engines/test_digbt.py4+++-
2 files changed, 4 insertions(+), 2 deletions(-)

diff --git a/searx/engines/digbt.py b/searx/engines/digbt.py @@ -40,7 +40,7 @@ def response(resp): results = list() for result in search_res: url = urljoin(URL, result.xpath('.//a[@title]/@href')[0]) - title = result.xpath('.//a[@title]/text()')[0] + title = extract_text(result.xpath('.//a[@title]')) content = extract_text(result.xpath('.//div[@class="files"]')) files_data = extract_text(result.xpath('.//div[@class="tail"]')).split() filesize = get_torrent_size(files_data[FILESIZE], files_data[FILESIZE_MULTIPLIER]) diff --git a/tests/unit/engines/test_digbt.py b/tests/unit/engines/test_digbt.py @@ -28,7 +28,9 @@ class TestDigBTEngine(SearxTestCase): <table class="table"> <tr><td class="x-item"> <div> - <a title="The Big Bang Theory" class="title" href="/The-Big-Bang-Theory-d2.html">The Big Bang Theory</a> + <a title="The Big Bang Theory" class="title" href="/The-Big-Bang-Theory-d2.html"> + The Big <span class="highlight">Bang</span> Theory + </a> <span class="ctime"><span style="color:red;">4 hours ago</span></span> </div> <div class="files">