mirror of
https://github.com/searxng/searxng.git
synced 2026-06-03 00:17:16 +02:00
[refactor] duration strings: move parsing logic to utils.py
This commit is contained in:
@@ -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')),
|
||||
}
|
||||
)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user