diff options
| author | Noémi Ványi <kvch@users.noreply.github.com> | 2020-06-28 20:28:12 +0200 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2020-06-28 20:28:12 +0200 |
| commit | 93cbd85b8a5becdf69e6d70dd7c60f7122531262 (patch) | |
| tree | 90d202af89e02fc3e83d5bdf4a924b05ff197261 /searx/engines | |
| parent | 385e9b5c9e2d1caa73f99dac0bf1be1c46505121 (diff) | |
| parent | f9f5974968ce767c24eea8c8a651d0e3945fc01b (diff) | |
Merge branch 'master' into duckduckgo_correction
Diffstat (limited to 'searx/engines')
| -rw-r--r-- | searx/engines/flickr_noapi.py | 12 | ||||
| -rw-r--r-- | searx/engines/yahoo.py | 2 |
2 files changed, 5 insertions, 9 deletions
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 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'], |