diff options
author | Adam Tauber <asciimoo@gmail.com> | 2015-01-29 19:44:52 +0100 |
---|---|---|
committer | Adam Tauber <asciimoo@gmail.com> | 2015-01-29 19:44:52 +0100 |
commit | 8de97dac03fc97a9705c8d3cd3163330a6f08375 (patch) | |
tree | df36aff925e8c110813359590ce03b4af41e947f /searx/webapp.py | |
parent | bac98a02cbca8083c1dfcaf54c55be2bcfb0576b (diff) | |
download | searxng-8de97dac03fc97a9705c8d3cd3163330a6f08375.tar.gz searxng-8de97dac03fc97a9705c8d3cd3163330a6f08375.zip |
[mod] pretty url separation
Diffstat (limited to 'searx/webapp.py')
-rw-r--r-- | searx/webapp.py | 9 |
1 files changed, 3 insertions, 6 deletions
diff --git a/searx/webapp.py b/searx/webapp.py index 04854a14b..4300c1dca 100644 --- a/searx/webapp.py +++ b/searx/webapp.py @@ -42,7 +42,8 @@ from searx.engines import ( ) from searx.utils import ( UnicodeWriter, highlight_content, html_to_text, get_themes, - get_static_files, get_result_templates, gen_useragent, dict_subset + get_static_files, get_result_templates, gen_useragent, dict_subset, + prettify_url ) from searx.version import VERSION_STRING from searx.languages import language_codes @@ -330,11 +331,7 @@ def index(): result['title'] = ' '.join(html_to_text(result['title']) .strip().split()) - if len(result['url']) > 74: - url_parts = result['url'][:35], result['url'][-35:] - result['pretty_url'] = u'{0}[...]{1}'.format(*url_parts) - else: - result['pretty_url'] = result['url'] + result['pretty_url'] = prettify_url(result['url']) # TODO, check if timezone is calculated right if 'publishedDate' in result: |