From 32f7877235f87f1dcfabc271e5c92539bbcdac9a Mon Sep 17 00:00:00 2001 From: Adam Tauber Date: Mon, 15 Jun 2020 19:15:24 +0200 Subject: [fix] resolve flickr_noapi encoding issues --- searx/engines/flickr_noapi.py | 12 ++++-------- 1 file changed, 4 insertions(+), 8 deletions(-) (limited to 'searx/engines') diff --git a/searx/engines/flickr_noapi.py b/searx/engines/flickr_noapi.py index c8ee34f7a..1cbb3e0a9 100644 --- a/searx/engines/flickr_noapi.py +++ b/searx/engines/flickr_noapi.py @@ -117,14 +117,10 @@ def response(resp): 'img_format': img_format, 'template': 'images.html' } - try: - result['author'] = author - result['title'] = title - result['content'] = content - except: - result['author'] = '' - result['title'] = '' - result['content'] = '' + result['author'] = author.encode('utf-8', 'ignore').decode('utf-8') + result['source'] = source.encode('utf-8', 'ignore').decode('utf-8') + result['title'] = title.encode('utf-8', 'ignore').decode('utf-8') + result['content'] = content.encode('utf-8', 'ignore').decode('utf-8') results.append(result) return results -- cgit v1.2.3 From 5293e580323c28476b27639156d0a780745e0760 Mon Sep 17 00:00:00 2001 From: Markus Heiser Date: Thu, 25 Jun 2020 21:45:42 +0200 Subject: [fix] yahoo engine - changed content_xpath Signed-off-by: Markus Heiser --- searx/engines/yahoo.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'searx/engines') diff --git a/searx/engines/yahoo.py b/searx/engines/yahoo.py index 36c1a11f8..a6b4aeb9f 100644 --- a/searx/engines/yahoo.py +++ b/searx/engines/yahoo.py @@ -33,7 +33,7 @@ supported_languages_url = 'https://search.yahoo.com/web/advanced' results_xpath = "//div[contains(concat(' ', normalize-space(@class), ' '), ' Sr ')]" url_xpath = './/h3/a/@href' title_xpath = './/h3/a' -content_xpath = './/div[@class="compText aAbs"]' +content_xpath = './/div[contains(@class, "compText")]' suggestion_xpath = "//div[contains(concat(' ', normalize-space(@class), ' '), ' AlsoTry ')]//a" time_range_dict = {'day': ['1d', 'd'], -- cgit v1.2.3