summaryrefslogtreecommitdiff
path: root/searx/engines
diff options
context:
space:
mode:
authorAdam Tauber <asciimoo@gmail.com>2015-08-28 14:51:32 +0200
committerAdam Tauber <asciimoo@gmail.com>2015-08-28 14:51:32 +0200
commit604f32f67276a34a3ead265ff89d3bb807902b26 (patch)
tree30b1f04e2a797f7842c2f86433b7d2a0a0f75e78 /searx/engines
parentb9c8039d743376ab134adb3da146519c5353c36c (diff)
[fix] bing unicode encode error - fixes #408
Diffstat (limited to 'searx/engines')
-rw-r--r--searx/engines/bing.py2
-rw-r--r--searx/engines/bing_images.py2
-rw-r--r--searx/engines/bing_news.py2
3 files changed, 3 insertions, 3 deletions
diff --git a/searx/engines/bing.py b/searx/engines/bing.py
index c72e6aeff..171606cf6 100644
--- a/searx/engines/bing.py
+++ b/searx/engines/bing.py
@@ -52,7 +52,7 @@ def request(query, params):
def response(resp):
results = []
- dom = html.fromstring(resp.content)
+ dom = html.fromstring(resp.text)
# parse results
for result in dom.xpath('//div[@class="sa_cc"]'):
diff --git a/searx/engines/bing_images.py b/searx/engines/bing_images.py
index 839b8e5be..06850dfe1 100644
--- a/searx/engines/bing_images.py
+++ b/searx/engines/bing_images.py
@@ -63,7 +63,7 @@ def request(query, params):
def response(resp):
results = []
- dom = html.fromstring(resp.content)
+ dom = html.fromstring(resp.text)
# init regex for yaml-parsing
p = re.compile('({|,)([a-z]+):(")')
diff --git a/searx/engines/bing_news.py b/searx/engines/bing_news.py
index a2397c48e..943bf882e 100644
--- a/searx/engines/bing_news.py
+++ b/searx/engines/bing_news.py
@@ -68,7 +68,7 @@ def request(query, params):
def response(resp):
results = []
- rss = etree.fromstring(resp.content)
+ rss = etree.fromstring(resp.text)
ns = rss.nsmap