From d1d4ed4376e41fa380b5b3a72e1b08e1f36a35e8 Mon Sep 17 00:00:00 2001 From: marc Date: Tue, 20 Sep 2016 15:35:54 -0500 Subject: [PATCH] [fix] results with digbit don't truncate anymore --- searx/engines/digbt.py | 2 +- tests/unit/engines/test_digbt.py | 4 +++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/searx/engines/digbt.py b/searx/engines/digbt.py index c35327e8c..b55d7747a 100644 --- 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 index 867188ed9..31a1b03a4 100644 --- a/tests/unit/engines/test_digbt.py +++ b/tests/unit/engines/test_digbt.py @@ -28,7 +28,9 @@ class TestDigBTEngine(SearxTestCase):