From 4dfc47584d7c946b9682dc1e4858fae003b16d1f Mon Sep 17 00:00:00 2001 From: Bnyro Date: Thu, 20 Mar 2025 21:16:37 +0100 Subject: [refactor] duration strings: move parsing logic to utils.py --- searx/engines/presearch.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'searx/engines/presearch.py') diff --git a/searx/engines/presearch.py b/searx/engines/presearch.py index ed68e1507..7e30801d1 100644 --- a/searx/engines/presearch.py +++ b/searx/engines/presearch.py @@ -73,7 +73,7 @@ Implementations from urllib.parse import urlencode, urlparse from searx import locales from searx.network import get -from searx.utils import gen_useragent, html_to_text +from searx.utils import gen_useragent, html_to_text, parse_duration_string about = { "website": "https://presearch.io", @@ -270,7 +270,7 @@ def response(resp): 'url': item.get('link'), 'content': item.get('description', ''), 'thumbnail': item.get('image'), - 'length': item.get('duration'), + 'length': parse_duration_string(item.get('duration')), } ) -- cgit v1.2.3