diff options
| author | Thomas Pointhuber <thomas.pointhuber@gmx.at> | 2014-03-05 15:10:38 +0100 |
|---|---|---|
| committer | Thomas Pointhuber <thomas.pointhuber@gmx.at> | 2014-03-05 15:10:38 +0100 |
| commit | e30f43bd81b3d7a682b3bb65eacd20ddb46b5230 (patch) | |
| tree | 0cd30184ab574b4177ad3f04f9826ba82bfbeda1 /searx/engines/xpath.py | |
| parent | 07f83cab224d2ddf1f7fd8b544f2f2d6679c2416 (diff) | |
| parent | 73ab92544a5240bcbe7a1d39ee50ad809125db30 (diff) | |
Merge remote-tracking branch 'asciimoo/master'
Diffstat (limited to 'searx/engines/xpath.py')
| -rw-r--r-- | searx/engines/xpath.py | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/searx/engines/xpath.py b/searx/engines/xpath.py index 9af24de3b..72120304e 100644 --- a/searx/engines/xpath.py +++ b/searx/engines/xpath.py @@ -1,7 +1,7 @@ from lxml import html from urllib import urlencode, unquote from urlparse import urlparse, urljoin -from lxml.etree import _ElementStringResult +from lxml.etree import _ElementStringResult, _ElementUnicodeResult from searx.utils import html_to_text search_url = None @@ -29,7 +29,7 @@ def extract_text(xpath_results): for e in xpath_results: result = result + extract_text(e) return result - elif type(xpath_results) == _ElementStringResult: + elif type(xpath_results) in [_ElementStringResult, _ElementUnicodeResult]: # it's a string return ''.join(xpath_results) else: |